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
6ccdea65
Commit
6ccdea65
authored
May 05, 2012
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core.loop: add 'pendingcnt' property and add 'pending=<>' part to __repr__
parent
b3f6b55a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
gevent/core.ppyx
gevent/core.ppyx
+8
-2
gevent/libev.pxd
gevent/libev.pxd
+1
-0
No files found.
gevent/core.ppyx
View file @
6ccdea65
...
...
@@ -405,6 +405,11 @@ cdef public class loop [object PyGeventLoopObject, type PyGeventLoop_Type]:
return value
return backend
property pendingcnt:
def __get__(self):
return libev.ev_pending_count(self._ptr)
def io(self, int fd, int events, ref=True, priority=None):
return io(self, fd, events, ref, priority)
...
...
@@ -450,6 +455,7 @@ cdef public class loop [object PyGeventLoopObject, type PyGeventLoop_Type]:
cdef object msg = self.backend
if self.default:
msg += ' default'
msg += ' pending=%s' % self.pendingcnt
#ifdef LIBEV_EMBED
msg += self._format_details()
#endif
...
...
@@ -470,10 +476,10 @@ cdef public class loop [object PyGeventLoopObject, type PyGeventLoop_Type]:
activecnt = self.activecnt
except AttributeError:
pass
if fileno is not None:
msg += ' fileno=' + repr(fileno)
if activecnt is not None:
msg += ' ref=' + repr(activecnt)
if fileno is not None:
msg += ' fileno=' + repr(fileno)
if sigfd is not None and sigfd != -1:
msg += ' sigfd=' + repr(sigfd)
return msg
...
...
gevent/libev.pxd
View file @
6ccdea65
...
...
@@ -184,3 +184,4 @@ cdef extern from "libev.h":
void
ev_ref
(
ev_loop
*
)
void
ev_unref
(
ev_loop
*
)
void
ev_break
(
ev_loop
*
,
int
)
unsigned
int
ev_pending_count
(
ev_loop
*
)
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