Skip to content
This repository has been archived by the owner on Nov 23, 2017. It is now read-only.

Add a task_factory to support custom Task subclasses #185

Closed
GoogleCodeExporter opened this issue Apr 10, 2015 · 2 comments
Closed

Add a task_factory to support custom Task subclasses #185

GoogleCodeExporter opened this issue Apr 10, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

To support Trollius, the greenio project requires a "task factory" to create 
GreenTask instead of Task in Task._step(). In february, Luca Sbardella sent a 
similar request for its Pulsar project.

I propose to add get_task_factory() and set_task_factory() to event loop 
policy. The default task factory would be the Task class in asyncio, but the 
default may be different in a custom event loop policy.

Patch:
https://codereview.appspot.com/110820049/

See also the "Tulip, Trollius and greenio: add asyncio.tasks.task_factory" 
thread on the mailing list.

Original issue reported on code.google.com by victor.s...@gmail.com on 5 Jul 2014 at 1:50

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

No branches or pull requests

1 participant