tractor icon indicating copy to clipboard operation
tractor copied to clipboard

Enhance the portal (close) API?

Open goodboy opened this issue 7 years ago • 3 comments

I ran into problems trying to get channels to reliably tear down using StreamSocket.aclose() as per python-trio/trio/pull/460.

@njsmith was very helpful in pointing out that until this is resolved streams need to be cancelled using a separate scope / task which is what I ended up doing with open_portal() but I feel like this can be made even fancier according to his answer on SO.

Definitely worth toying with.

goodboy avatar Jul 06 '18 03:07 goodboy

Also @nonsleepr on July 6, 2018 10:30 AM came up with an example that might not require the extra nursery.

goodboy avatar Jul 06 '18 20:07 goodboy

python-trio/trio#460 Is in so we can toy with dropping the extra nursery that was added to work around the underlying issue.

goodboy avatar Jul 25 '18 14:07 goodboy

This probably also ties into #206.

goodboy avatar Apr 28 '21 17:04 goodboy