Message223498
Currently, threading.Thread requires that group=None pending implementation of a ThreadGroup class such as that described in http://www.javaworld.com/article/2074481
This has been an open todo for very long time, possibly because it may be too big of a task to implement all the features including subgroups.
I think we can implement a small but useful set of features without too much difficultly:
path_explorers = threading.ThreadGroup('path_explorers')
for path in paths:
threading.Thread(path_explorers, explore, (path,))
for thread in path_explorers: # enumerate unfinished explorers
print(thread)
path_explorers.start() # begin parallel search
path_explorers.join() # wait for group to finish
print("Result:", best_path) |
|
Date |
User |
Action |
Args |
2014-07-20 06:56:34 | rhettinger | set | recipients:
+ rhettinger |
2014-07-20 06:56:34 | rhettinger | set | messageid: <1405839394.09.0.812488093428.issue22013@psf.upfronthosting.co.za> |
2014-07-20 06:56:34 | rhettinger | link | issue22013 messages |
2014-07-20 06:56:33 | rhettinger | create | |
|