Message341660
| Author | Brian McCutchon |
|---|---|
| Recipients | Brian McCutchon, bquinlan, pitrou |
| Date | 2019-05-06.23:05:13 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1557183913.22.0.335687761564.issue36395@roundup.psfhosted.org> |
| In-reply-to |
| Content | |
|---|---|
I understand your hesitation to add a fake. Would it be better to make it possible to subclass Executor so that a third party implementation of this can be developed?
As for an example, here is an example of nondeterminism when using a ThreadPoolExecutor with a single worker. It sometimes prints "False" and sometimes "True" on my machine.
from concurrent import futures
import time
complete = False
def complete_eventually():
global complete
for _ in range(150000):
pass
complete = True
with futures.ThreadPoolExecutor(max_workers=1) as pool:
pool.submit(complete_eventually)
print(complete) |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2019-05-06 23:05:13 | Brian McCutchon | set | recipients: + Brian McCutchon, bquinlan, pitrou |
| 2019-05-06 23:05:13 | Brian McCutchon | set | messageid: <1557183913.22.0.335687761564.issue36395@roundup.psfhosted.org> |
| 2019-05-06 23:05:13 | Brian McCutchon | link | issue36395 messages |
| 2019-05-06 23:05:13 | Brian McCutchon | create | |