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
4b5ecfe0
Commit
4b5ecfe0
authored
Apr 05, 2011
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use list, instead of set for Greenlet._links; this fixes issue #64
parent
2f231ce3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
gevent/greenlet.py
gevent/greenlet.py
+6
-3
No files found.
gevent/greenlet.py
View file @
4b5ecfe0
...
...
@@ -138,7 +138,7 @@ class Greenlet(greenlet):
self
.
args
=
args
if
kwargs
:
self
.
kwargs
=
kwargs
self
.
_links
=
set
()
self
.
_links
=
[]
self
.
value
=
None
self
.
_exception
=
_NONE
loop
=
self
.
parent
.
loop
...
...
@@ -396,7 +396,7 @@ class Greenlet(greenlet):
"""
if
not
callable
(
callback
):
raise
TypeError
(
'Expected callable: %r'
%
(
callback
,
))
self
.
_links
.
a
d
d
(
callback
)
self
.
_links
.
a
ppen
d
(
callback
)
if
self
.
ready
()
and
not
self
.
_notifier
.
active
:
self
.
_notifier
.
start
(
self
.
_notify_links
)
...
...
@@ -438,7 +438,10 @@ class Greenlet(greenlet):
receiver
=
getcurrent
()
# discarding greenlets when we have GreenletLink instances in _links works, because
# a GreenletLink instance pretends to be a greenlet, hash-wise and eq-wise
self
.
_links
.
discard
(
receiver
)
try
:
self
.
_links
.
remove
(
receiver
)
except
ValueError
:
pass
def
link_value
(
self
,
receiver
=
None
,
GreenletLink
=
SuccessGreenletLink
,
SpawnedLink
=
SuccessSpawnedLink
):
"""Like :meth:`link` but *receiver* is only notified when the greenlet has completed successfully"""
...
...
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