[Issue 21232] std.parallelism.parallel reuses thread, leading to stale static data
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Sep 9 09:48:02 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21232
kinke <kinke at gmx.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kinke at gmx.net
--- Comment #1 from kinke <kinke at gmx.net> ---
Pardon me, but isn't this to be expected? Creating a thread per iteration would
be an absolutely inacceptable overhead in many cases. From the std.parallelism
docs:
"After creation, a Task may be executed in a new thread, or submitted to a
TaskPool for execution. A TaskPool encapsulates a task queue and its worker
threads. Its purpose is to efficiently map a large number of Tasks onto a
smaller number of threads."
--
More information about the Digitalmars-d-bugs
mailing list