Steven W McDougall wrote:
> How do `our' and `my' control mutex locking?

I was assuming that all global (or "non-my" rather) variables would by
default be shared when using a thread-enabled perl. That seems like a
sensible default. If we're going to require the :shared modifier, then
ignore my comments on "our" vs. "my".

Regardless, it seems that perl must make a copy of a closure's
environment for each thread the closure runs under. If a variable in the
environment is marked :shared, only the proxy should be copied. This
breaks closures, but seems unavoidable given the performance/deadlock
problems of locking and the difficulty of figuring out whether a closure
will run simultaneously in two different threads.

- Ken

Reply via email to