Am Wed, 06 Aug 2014 20:19:33 -0700 schrieb Walter Bright <[email protected]>:
> On 8/6/2014 5:22 PM, Sean Kelly wrote: > > On Wednesday, 6 August 2014 at 22:01:47 UTC, Walter Bright wrote: > >> On 8/6/2014 12:34 PM, Sean Kelly wrote: > >>> There is no facility for forcing a clean termination of another > >>> thread. > >> > >> Understood - so the only option is to force an unclean termination. > > > > So in all cases, it seems like what we should be doing is call > > exit(1) or the equivalent and forego any attempt at cleanup. > > Otherwise an assertion failure in a spawned thread would be handled > > even more strongly than in the main thread. > > > > Alternately, if we build on std.concurrency we could have the next > > call to receive throw a FatalError or something to force it to > > terminate. But there's no telling how long this would be. I > > assume you prefer the forceful route. > > Yes, I prefer that. > > I can see some benefits here, but how does this interact with asserts in unittests? You might special-case these, but it's also common practice to use these asserts not only in the main unittest function but also in helper functions.
