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
32d9e236
Commit
32d9e236
authored
Jan 10, 2012
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: remove 'sent' property; make 'async.pending' property use ev_async_pending()
parent
16baea38
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
11 deletions
+28
-11
gevent/core.ppyx
gevent/core.ppyx
+28
-11
No files found.
gevent/core.ppyx
View file @
32d9e236
...
...
@@ -500,11 +500,6 @@ cdef public class loop [object PyGeventLoopObject, type PyGeventLoop_Type]:
Py_DECREF(<PyObjectPtr>self) \
self._flags &= ~1 \
\
property pending: \
\
def __get__(self): \
return True if libev.ev_is_pending(&self._watcher) else False \
\
property priority: \
\
def __get__(self): \
...
...
@@ -534,11 +529,22 @@ cdef public class loop [object PyGeventLoopObject, type PyGeventLoop_Type]:
libev.ev_##TYPE##_start(self.loop._ptr, &self._watcher) \
PYTHON_INCREF
#define PENDING \
property pending: \
\
def __get__(self): \
return True if libev.ev_is_pending(&self._watcher) else False
#define WATCHER(TYPE) WATCHER_BASE(TYPE) \
\
START(TYPE) \
\
ACTIVE
ACTIVE \
\
PENDING
#define COMMA ,
...
...
@@ -594,6 +600,8 @@ cdef public class io(watcher) [object PyGeventIOObject, type PyGeventIO_Type]:
ACTIVE
PENDING
#ifdef _WIN32
def __init__(self, loop loop, long fd, int events, ref=True):
...
...
@@ -680,6 +688,8 @@ cdef public class timer(watcher) [object PyGeventTimerObject, type PyGeventTimer
ACTIVE
PENDING
def __init__(self, loop loop, double after=0.0, double repeat=0.0, ref=True):
if repeat < 0.0:
raise ValueError("repeat must be positive or zero: %r" % repeat)
...
...
@@ -750,17 +760,22 @@ cdef public class fork(watcher) [object PyGeventForkObject, type PyGeventFork_Ty
cdef public class async(watcher) [object PyGeventAsyncObject, type PyGeventAsync_Type]:
WATCHER(async)
WATCHER_BASE(async)
START(async)
ACTIVE
property pending:
def __get__(self):
return True if libev.ev_async_pending(&self._watcher) else False
INIT(async,,)
def send(self):
libev.ev_async_send(self.loop._ptr, &self._watcher)
@property
def sent(self):
return libev.ev_async_pending(&self._watcher)
#cdef public class child(watcher) [object PyGeventChildObject, type PyGeventChild_Type]:
#
...
...
@@ -788,6 +803,8 @@ cdef public class callback(watcher) [object PyGeventCallbackObject, type PyGeven
def __get__(self):
return self.callback is not None
PENDING
__SYSERR_CALLBACK = 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