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
aa2f5bf6
Commit
aa2f5bf6
authored
Jan 30, 2013
by
Sam Rushing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
missed in the 'modernize' merge: remove uses of PyDict_Contains()
parent
315bcf2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
coro/linux_poller.pyx
coro/linux_poller.pyx
+6
-6
No files found.
coro/linux_poller.pyx
View file @
aa2f5bf6
...
...
@@ -173,7 +173,7 @@ cdef class event_key:
cdef
public
class
queue_poller
[
object
queue_poller_object
,
type
queue_poller_type
]:
cdef
int
ep_fd
cdef
obje
ct
event_map
cdef
di
ct
event_map
def
__init__
(
self
):
self
.
ep_fd
=
-
1
...
...
@@ -192,7 +192,7 @@ cdef public class queue_poller [ object queue_poller_object, type queue_poller_t
cdef
object
set_wait_for
(
self
,
event_key
ek
):
cdef
coro
me
cdef
unsigned
flag
=
0
if
PyDict_Contains
(
self
.
event_map
,
ek
):
if
self
.
event_map
.
has_key
(
ek
):
# Should be impossible to have KeyError due to previous line.
et
=
self
.
event_map
[
ek
]
raise
SimultaneousError
(
the_scheduler
.
_current
,
et
,
ek
)
...
...
@@ -201,8 +201,8 @@ cdef public class queue_poller [ object queue_poller_object, type queue_poller_t
ek1
=
event_key
(
EPOLLOUT
,
ek
.
fd
)
ek2
=
event_key
(
EPOLLIN
,
ek
.
fd
)
if
(
(
PyDict_Contains
(
self
.
event_map
,
ek2
)
and
ek
.
events
==
EPOLLOUT
)
or
(
PyDict_Contains
(
self
.
event_map
,
ek1
)
and
ek
.
events
==
EPOLLIN
)):
if
(
(
self
.
event_map
.
has_key
(
ek2
)
and
ek
.
events
==
EPOLLOUT
)
or
(
self
.
event_map
.
has_key
(
ek1
)
and
ek
.
events
==
EPOLLIN
)):
flags
=
EPOLLOUT
|
EPOLLIN
|
EPOLLET
else
:
flags
=
EPOLLET
...
...
@@ -222,7 +222,7 @@ cdef public class queue_poller [ object queue_poller_object, type queue_poller_t
cdef
event_key
ek
ek
=
event_key
(
EPOLLIN
,
fd
)
if
PyDict_Contains
(
self
.
event_map
,
ek
):
if
self
.
event_map
.
has_key
(
ek
):
co
=
self
.
event_map
[
ek
]
del
self
.
event_map
[
ek
]
...
...
@@ -232,7 +232,7 @@ cdef public class queue_poller [ object queue_poller_object, type queue_poller_t
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
):
if
self
.
event_map
.
has_key
(
ek
):
co
=
self
.
event_map
[
ek
]
del
self
.
event_map
[
ek
]
...
...
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