teepark / greenhouse

non-blocking IO with coroutines to mimic blocking IO with threads
BSD 3-Clause "New" or "Revised" License
35 stars 5 forks source link

Implement futures interface? #15

Open dsully opened 11 years ago

dsully commented 11 years ago

Should greenhouse provide a Futures interface?

https://pypi.python.org/pypi/futures aka http://docs.python.org/dev/library/concurrent.futures.html

Thanks

teepark commented 11 years ago

Yes, by all means.

I had this on my mind as part of an effort to bring all stdlib emulation up-to-par on current python versions.

Like a few other things I think there would be an Executor class exposed in greenhouse.ext, which is patched over ThreadPoolExecutor in greenhouse.emulation.

I have something similar implemented in https://github.com/teepark/junction/blob/master/junction/futures.py.