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

Add future/greenlet adaptors #4

Open
fantix opened this issue Apr 28, 2014 · 2 comments
Open

Add future/greenlet adaptors #4

fantix opened this issue Apr 28, 2014 · 2 comments

Comments

@fantix
Copy link
Member

fantix commented Apr 28, 2014

Within asyncio code, we should be able to wait for greenlets like this:

@asyncio.coroutine
def some_routine():
    yield from as_future(gevent.spawn(....))

Likewise, we should also be able to wait for futures in gevent code:

def gevent_handle():
    wait_future(asyncio.sleep(1))

At last, we want to mix explicit asyncio yields and implicit gevent switches in one method:

@tulipcore.coroutine
def some_routine():
    yield from asyncio.sleep(1)
    gevent.sleep(1)
@graingert
Copy link
Contributor

This would be extremely handy. I'd like to see some gunicorn demos soon!

@fantix
Copy link
Member Author

fantix commented May 8, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants