How do I break from loop when using parallel()?

Dr.No jckj33 at
Mon May 28 21:04:21 UTC 2018

		import std.parallelism : parallel;
		foreach(t; parallel(arr))
			if(!doSomething(t)) {
				return false;

It reuturns the run time error:

> std.parallelism.ParallelForeachError@(0): Cannot break from a 
> parallel foreach loop using break, return, labeled 
> break/continue or goto statements.

What's the proper way to break from loop?

More information about the Digitalmars-d-learn mailing list