develooper Front page | perl.perl6.users | Postings from September 2017

Re: thread behavior

Thread Previous | Thread Next
Elizabeth Mattijsen
September 4, 2017 07:58
Re: thread behavior
Message ID:
> On 4 Sep 2017, at 09:29, Marcel Timmerman <> wrote:
> I was wondering about the following,
> When an Exception is thrown in a thread and is CATCHed  in another object, will that block be run in the same thread as the Exception is thrown?

I think from 6.d onward, you can not rely on your code being executed in any specific thread, especially when using await(), but possibly more generally in the future.

So it feels like a premature optimisation depending on your code being executed by the same thread in *any* situation, but especially in the light of control exceptions.

Hope this is a useful answer  :-)

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About