Author Nathaniel Manista
Recipients Nathaniel Manista, asvetlov, bquinlan, bwhmather
Date 2017-05-26.20:21:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1495830087.04.0.363393135012.issue22729@psf.upfronthosting.co.za>
In-reply-to
Content
gRPC Python is strongly affected by this as well. We use grpc.Future objects (https://github.com/grpc/grpc/blob/e5f99b587338164230b0b2121d242fb015c2ae5a/src/python/grpcio/grpc/__init__.py#L50) to represent RPCs taking place asynchronously. Despite our grpc.Futures being interface-compatible with concurrent.futures.Future objects, we (in our tests) and our users (in their applications) cannot make use of the concurrent.futures.as_completed function (https://github.com/grpc/grpc/blob/e5f99b587338164230b0b2121d242fb015c2ae5a/src/python/grpcio_tests/tests/unit/_rpc_test.py#L388 shows the "wrapping" that has to be done to work around the problem).

It's not at all clear why as_completed shouldn't work with any future objects that are public-interface-compatible with concurrent.futures.Future objects.

I would be happy to reimplement the function if my change would be accepted. I part ways with this issue's original reporter in that I don't see the need to widen the public API any further with a "remove_done_callback" method... but maybe I'm missing some small detail?
History
Date User Action Args
2017-05-26 20:21:27Nathaniel Manistasetrecipients: + Nathaniel Manista, bquinlan, asvetlov, bwhmather
2017-05-26 20:21:27Nathaniel Manistasetmessageid: <1495830087.04.0.363393135012.issue22729@psf.upfronthosting.co.za>
2017-05-26 20:21:26Nathaniel Manistalinkissue22729 messages
2017-05-26 20:21:26Nathaniel Manistacreate