New submission from Raymond Hettinger:

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)

----------
components: Library (Lib)
messages: 223498
nosy: rhettinger
priority: normal
severity: normal
stage: needs patch
status: open
title: Add at least minimal support for thread groups
type: enhancement
versions: Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22013>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to