1
0
Fork 0
Commit Graph

15 Commits (57edf481e8cf687fb1b0ef7d36d04bf4acd85047)

Author SHA1 Message Date
Tyler Goodlet 57edf481e8 Always raise asyncio errors 2021-09-08 07:46:55 -04:00
Tyler Goodlet 86f4f2df6f Drop old implementation cruft 2021-09-08 07:46:55 -04:00
Tyler Goodlet 2bd5ba76b9 Fix error propagation on asyncio streaming tasks 2021-09-08 07:46:55 -04:00
Tyler Goodlet a4859c969c Drop bad .close() call 2021-09-08 07:46:55 -04:00
Tyler Goodlet 2dfa12c743 Proxy asyncio cancelleds as well 2021-09-08 07:46:55 -04:00
Tyler Goodlet e161f7bac0 WIP redo asyncio async gen streaming 2021-09-08 07:46:55 -04:00
Tyler Goodlet cb43c4c428 Pass func refs 2021-09-08 07:46:55 -04:00
Tyler Goodlet 0802736095 Raise any asyncio errors if in trio task on cancel 2021-09-08 07:46:55 -04:00
Tyler Goodlet 68e5c2a95f Raise from asyncio error; fixes mypy 2021-09-08 07:46:55 -04:00
Tyler Goodlet 2adb59f40f Tweak log msg 2021-09-08 07:46:55 -04:00
Tyler Goodlet 0bac1f3021 Log error 2021-09-08 07:46:55 -04:00
Tyler Goodlet 92594d8222 Attempt to make mypy happy.. 2021-09-08 07:46:55 -04:00
Tyler Goodlet a2d119ab56 Wow, fix all the broken async func invoking code..
Clearly this wasn't developed against a task that spawned just an async
func in `asyncio`.. Fix all that and remove a bunch of unnecessary func
layers. Add provisional support for the target receiving the `to_trio`
and `from_trio` channels and for the @tractor.stream marker.
2021-09-08 07:46:55 -04:00
Tyler Goodlet 9b7a4a1cd5 Move asyncio guest mode entrypoint to `to_asyncio`
The function is useful if you want to run the "main process" under
`asyncio`. Until `trio` core wraps this better we'll keep our own copy
in the interim (there's a new "inside-out-guest" mode almost on
mainline so hang tight).
2021-09-08 07:46:55 -04:00
Tyler Goodlet d55671f68b Propagate any spawned `asyncio` task error upwards
This should mostly maintain top level SC principles for any task spawned
using `tractor.to_asyncio.run()`. When the `asyncio` task completes make
sure to cancel the pertaining `trio` cancel scope and raise any error
that may have resulted.

Resolves #120
2021-09-08 07:46:55 -04:00