Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing of events (pass_events) to the IO callback #531

Closed
mnunberg opened this issue Jan 14, 2015 · 2 comments
Closed

Allow passing of events (pass_events) to the IO callback #531

mnunberg opened this issue Jan 14, 2015 · 2 comments
Labels
Interp: pypy Type: Enhancement We can do better through adding this

Comments

@mnunberg
Copy link

The C version has a pass_events kwarg which lets the callback receive the actual events which took place. This might be useful for integration with other lower level libraries, as it saves on the check in Python itself.

Can you add this to the coreffi layer?

See

def _run_callback(self, loop, c_watcher, revents):
for an example, and

https://github.com/couchbase/couchbase-python-client/blob/8cbd028432dab97701c6396c40f2899b881e0016/gcouchbase/iops_gevent10.py#L29-41 for a use case

@mnunberg mnunberg changed the title Allow passing of events to the IO callback Allow passing of events (pass_events) to the IO callback Jan 14, 2015
@mnunberg mnunberg changed the title Allow passing of events (pass_events) to the IO callback Allow passing of events (pass_events) to the IO callback Jan 14, 2015
@jamadden jamadden added Type: Enhancement We can do better through adding this Interp: pypy labels Jul 1, 2015
@jamadden
Copy link
Member

jamadden commented Jul 1, 2015

If someone were to submit a PR that does this and includes a test case I'd be happy to review it.

@jamadden
Copy link
Member

This was implemented in PR #604.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Interp: pypy Type: Enhancement We can do better through adding this
Projects
None yet
Development

No branches or pull requests

2 participants