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
5e22a6da
Commit
5e22a6da
authored
Aug 13, 2009
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
event.Event: add clear() method
parent
20f0c8be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
gevent/event.py
gevent/event.py
+8
-3
No files found.
gevent/event.py
View file @
5e22a6da
...
...
@@ -30,9 +30,14 @@ class Event(object):
def
unlink
(
self
,
callback
):
self
.
_links
.
discard
(
callback
)
# def clear(self):
# self._value = _NONE
# need also make sure the current links receive the value but the new ones will wait
def
clear
(
self
):
"""Reset the internal state. Subsequently, greenlets calling wait() or get()
will block until set() or put() is called.
Greenlets that called get() and wait() before clear() but were not yet notified
since the last put() call will _not_ be notified.
"""
self
.
_value
=
_NONE
def
put
(
self
,
value
=
None
):
oldvalue
=
self
.
_value
...
...
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