Closed awestlake87 closed 3 years ago
but I think this might be better served as the default functionality rather than an opt-in functionality.
Concur, because this library is all about "magically" transforming rust futures to asyncio futures, and back, and cancellation (or simply dropping a future in rust) is a big part of either functionality, so i'd say that making this the default is reasonable and expected.
One thing; if you're going to instantly deprecate this in 0.15 and make it the default, then also note that in the documentation.
Yeah I agree, that's a good point.
Finally wrapping this PR up!
cancellable
variants about the future deprecation in 0.15
local_cancellable_*
variants to support cancellation for !Send
futureslocal_cancellable_*
variants.Should be ready for a 0.14.1 release unless something comes up last minute!
This PR addresses the issue brought up in #47 where the Rust future keeps running after the
asyncio.Future
has been cancelled.For now, I've added this functionality as a separate set of
cancellable_future_into_py*
conversions, but I think this might be better served as the default functionality rather than an opt-in functionality. I'm open to feedback and suggestions on this though!As it is now, it can be released as a patch, but in 0.15 the functionality in
cancellable_future_into_py*
might just be baked-in by default and thecancellable_future_into_py*
conversions would be deprecated.