The draining iterator that I removed here would drop remaining work items if the queue contained more items than there were workers. This would end computation prematurely.
Validation now succeeds both in the single-threaded and multi-threaded case. Performance is now much more in line with other implementations like C++.\
Unfortunately, due to the use of mutexes to resolve resource competition, the benchmark's performance profile does not improve with additional workers. However, that also means there are not data races.
The draining iterator that I removed here would drop remaining work items if the queue contained more items than there were workers. This would end computation prematurely.
Validation now succeeds both in the single-threaded and multi-threaded case. Performance is now much more in line with other implementations like C++.\ Unfortunately, due to the use of mutexes to resolve resource competition, the benchmark's performance profile does not improve with additional workers. However, that also means there are not data races.