Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
shrapnel
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
shrapnel
Commits
e58830f1
Commit
e58830f1
authored
Jun 13, 2012
by
Sergiy Galaburda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added cleanup of linux queue_poller object on socket closing.
parent
43e784ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
coro/linux_poller.pyx
coro/linux_poller.pyx
+22
-1
No files found.
coro/linux_poller.pyx
View file @
e58830f1
...
@@ -218,7 +218,28 @@ cdef public class queue_poller [ object queue_poller_object, type queue_poller_t
...
@@ -218,7 +218,28 @@ cdef public class queue_poller [ object queue_poller_object, type queue_poller_t
return
return
cdef
notify_of_close
(
self
,
int
fd
):
cdef
notify_of_close
(
self
,
int
fd
):
return
cdef
coro
co
cdef
event_key
ek
ek
=
event_key
(
EPOLLIN
,
fd
)
if
PyDict_Contains
(
self
.
event_map
,
ek
):
co
=
self
.
event_map
[
ek
]
del
self
.
event_map
[
ek
]
try
:
co
.
__interrupt
(
ClosedError
(
the_scheduler
.
_current
))
except
ScheduleError
:
W
(
'notify_of_close (%d) [read]: unable to interrupt thread: %r
\
n
'
%
(
fd
,
co
))
ek
=
event_key
(
EPOLLOUT
,
fd
)
if
PyDict_Contains
(
self
.
event_map
,
ek
):
co
=
self
.
event_map
[
ek
]
del
self
.
event_map
[
ek
]
try
:
co
.
__interrupt
(
ClosedError
(
the_scheduler
.
_current
))
except
ScheduleError
:
W
(
'notify_of_close (%d) [write]: unable to interrupt thread: %r
\
n
'
%
(
fd
,
co
))
cdef
_register_event
(
self
,
event_key
ek
,
unsigned
int
flags
):
cdef
_register_event
(
self
,
event_key
ek
,
unsigned
int
flags
):
cdef
int
r
cdef
int
r
...
...
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