classification
Title: What is Future.running() for in PEP 3148 / concurrent.futures.Future?
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.4
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, bquinlan, gvanrossum, python-dev, serhiy.storchaka, vstinner
Priority: normal Keywords:

Created on 2013-08-09 23:48 by gvanrossum, last changed 2017-11-04 08:47 by serhiy.storchaka. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 4271 merged python-dev, 2017-11-04 08:14
PR 4272 merged serhiy.storchaka, 2017-11-04 08:26
Messages (9)
msg194777 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2013-08-09 23:48
From glyph (in a particularly snarky mood):

"""
P.S.: I realize that this isn't really within the scope of this message, but as I was reviewing Future's documentation while writing it, I realized what Future.running() does.  Wow.  What a completely pointless bug magnet.  Why does this method even exist?  It seems like the only possible use would be to introduce look-before-you-leap bugs into concurrent code, like 'if not my_future.running(): my_future.cancel()'.  If it were for tracking the state of long-running Future operations for UI purposes or something, then 'my_future.add_start_callback(callback)' would be a much more useful interface, which at least has a hope of being used correctly.  Independently of the rest of stuff in this message, it would be great if that could be deprecated and removed.
"""

Despite the snarkiness, he does have a point.  Perhaps it was copied mindlessly from Java?
msg194779 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-08-10 01:58
New changeset 922c0fe6ebee by Guido van Rossum in branch 'default':
Get rid of Future.running(); see bug 18699.
http://hg.python.org/peps/rev/922c0fe6ebee
msg194780 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2013-08-10 02:02
(Note that my change to PEP 3156 is somewhat separate -- Tulip's Future doesn't have to follow all of the PEP 3148 API and its running() method did nothing anyway.  But concurrent.futures.Future has been released for several cycles and we must consider the removal of running() there more carefully.)
msg201272 - (view) Author: Brian Quinlan (bquinlan) * (Python committer) Date: 2013-10-25 18:05
The only thing that I've used .running() for is for UI reasons. But it is easier to just iterative over your futures and call a method than to install a callback and handle the state yourself.
msg205133 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2013-12-03 18:23
I see no point in keeping this open.
msg305539 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-11-04 08:13
New changeset b838cc3ff4e039af949c6a19bd896e98e944dcbe by Serhiy Storchaka (Chillar Anand) in branch 'master':
bpo-18699: Corrected documentation for window.chgat in curses module (#1430)
https://github.com/python/cpython/commit/b838cc3ff4e039af949c6a19bd896e98e944dcbe
msg305541 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-11-04 08:26
New changeset 6dbecd2cd9c9448b34e1a632509220f3c4cf7587 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6':
bpo-18699: Corrected documentation for window.chgat in curses module (GH-1430) (#4271)
https://github.com/python/cpython/commit/6dbecd2cd9c9448b34e1a632509220f3c4cf7587
msg305543 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-11-04 08:43
New changeset fd38819497fd2a52ada674f0c890f5b414d0e87f by Serhiy Storchaka in branch '2.7':
[2.7] bpo-18699: Corrected documentation for window.chgat in curses module (GH-1430). (#4272)
https://github.com/python/cpython/commit/fd38819497fd2a52ada674f0c890f5b414d0e87f
msg305544 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-11-04 08:47
Wrong issue number. All this is related to issue18669
History
Date User Action Args
2017-11-04 08:47:28serhiy.storchakasetmessages: + msg305544
2017-11-04 08:43:00serhiy.storchakasetmessages: + msg305543
2017-11-04 08:26:46serhiy.storchakasetmessages: + msg305541
2017-11-04 08:26:10serhiy.storchakasetpull_requests: + pull_request4235
2017-11-04 08:14:25python-devsetpull_requests: + pull_request4234
2017-11-04 08:13:19serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg305539
2017-05-04 18:52:07Mariattasetpull_requests: - pull_request1535
2017-05-03 13:31:41python-devsetpull_requests: + pull_request1535
2013-12-03 18:23:12gvanrossumsetstatus: open -> closed
type: enhancement -> behavior
messages: + msg205133

resolution: works for me
stage: resolved
2013-12-03 18:03:55vstinnersetnosy: + vstinner
2013-10-25 18:05:47bquinlansetnosy: + bquinlan
messages: + msg201272
2013-08-12 19:58:58asvetlovsetnosy: + asvetlov
2013-08-10 02:02:03gvanrossumsetmessages: + msg194780
2013-08-10 01:58:20python-devsetnosy: + python-dev
messages: + msg194779
2013-08-09 23:48:38gvanrossumcreate