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
18e77803
Commit
18e77803
authored
Jan 10, 2010
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move _NONE from timeout to hub
parent
f157b319
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
gevent/hub.py
gevent/hub.py
+9
-0
gevent/timeout.py
gevent/timeout.py
+1
-9
No files found.
gevent/hub.py
View file @
18e77803
...
...
@@ -272,3 +272,12 @@ class Waiter(object):
# can also have a debugging version, that wraps the value in a tuple (self, value) in switch()
# and unwraps it in wait() thus checking that switch() was indeed called
class
_NONE
(
object
):
"A special thingy you must never pass to any of gevent API"
__slots__
=
[]
def
__repr__
(
self
):
return
'<_NONE>'
_NONE
=
_NONE
()
gevent/timeout.py
View file @
18e77803
...
...
@@ -14,7 +14,7 @@ to arbitrary code.
"""
from
gevent
import
core
from
gevent.hub
import
getcurrent
from
gevent.hub
import
getcurrent
,
_NONE
__all__
=
[
'Timeout'
,
'with_timeout'
]
...
...
@@ -197,11 +197,3 @@ def with_timeout(seconds, function, *args, **kwds):
finally
:
timeout
.
cancel
()
class
_NONE
(
object
):
__slots__
=
[]
def
__repr__
(
self
):
return
'<_NONE>'
_NONE
=
_NONE
()
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