Message252334
I attached the first version of the documentation for `run_coroutine_threadsafe`. The `Concurrency and multithreading` section also needs to be updated but I could already use some feedback.
Also, I think we should add a `try-except` in the callback function, especially since users can set their own task factory. For instance:
loop.set_task_factory(lambda loop, coro: i_raise_an_exception)
will cause the future returned by `run_coroutine_threadsafe` to wait forever. Instead, we could have:
except Exception as exc:
if future.set_running_or_notify_cancel():
future.set_exception(exc)
inside the callback to notify the future. |
|
Date |
User |
Action |
Args |
2015-10-05 16:12:39 | vxgmichel | set | recipients:
+ vxgmichel, gvanrossum, vstinner, r.david.murray, Yury.Selivanov, python-dev, yselivanov |
2015-10-05 16:12:39 | vxgmichel | set | messageid: <1444061559.1.0.711185040308.issue25304@psf.upfronthosting.co.za> |
2015-10-05 16:12:39 | vxgmichel | link | issue25304 messages |
2015-10-05 16:12:39 | vxgmichel | create | |
|