Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
b030bb18
Commit
b030bb18
authored
Aug 22, 2010
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
socket: make shutdown() cancel socket's events
parent
3065c331
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
gevent/socket.py
gevent/socket.py
+11
-0
No files found.
gevent/socket.py
View file @
b030bb18
...
@@ -533,6 +533,17 @@ class socket(object):
...
@@ -533,6 +533,17 @@ class socket(object):
def
gettimeout
(
self
):
def
gettimeout
(
self
):
return
self
.
timeout
return
self
.
timeout
def
shutdown
(
self
,
how
):
cancel_wait
(
self
.
_rw_event
)
if
how
==
0
:
# SHUT_RD
cancel_wait
(
self
.
_read_event
)
elif
how
==
1
:
# SHUT_RW
cancel_wait
(
self
.
_write_event
)
else
:
cancel_wait
(
self
.
_read_event
)
cancel_wait
(
self
.
_write_event
)
self
.
_sock
.
shutdown
(
how
)
family
=
property
(
lambda
self
:
self
.
_sock
.
family
,
doc
=
"the socket family"
)
family
=
property
(
lambda
self
:
self
.
_sock
.
family
,
doc
=
"the socket family"
)
type
=
property
(
lambda
self
:
self
.
_sock
.
type
,
doc
=
"the socket type"
)
type
=
property
(
lambda
self
:
self
.
_sock
.
type
,
doc
=
"the socket type"
)
proto
=
property
(
lambda
self
:
self
.
_sock
.
proto
,
doc
=
"the socket protocol"
)
proto
=
property
(
lambda
self
:
self
.
_sock
.
proto
,
doc
=
"the socket protocol"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment