Agreed. In that case, the threads are just racing to observe a mutating value 
while it's in the "expected" state.

I will add my voice to the chorus calling for either making roles into 
closures, or producing a compile-time warning or error. It's tempting to use 
roles to "monkey patch", and would be good to be warned if it isn't a safe 
thing to do.

I'm fine with closing this as a duplicate.

> On Aug 29, 2017, at 7:32 AM, Sam S. via RT <perl6-bugs-follo...@perl.org> 
> wrote:
> 
> @David
> 
> I think this is not a thread safety issue, but rather a result of `role`s 
> (intentionally) not being closures.
> 
> I.e. a duplicate of this RT: This is a duplicate of 
> https://rt.perl.org/Ticket/Display.html?id=130965

Reply via email to