[issue13785] Make concurrent.futures.Future state public

Juan Javier report at bugs.python.org
Wed Feb 29 15:06:05 CET 2012


Juan Javier <jjdominguezm at gmail.com> added the comment:

The use case is to know the state of a future without having to do something like this

    @property
    def state(self):
        if self.future.running():
            return Process.States.Running
        elif self.future.cancelled():
            return Process.States.Cancelled
        elif self.future.done():
            return Process.States.Done
        return Process.States.Pending

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13785>
_______________________________________


More information about the Python-bugs-list mailing list