in reply to threads::shared locking via C API

See pthreads tutorial .. protecting shared resources. It looks like you want to use a mutex on the shared variable, there is example code there, using a mutex lock, further down in the tutorial. Whether it will work under Perl threads, I don't know.

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Replies are listed 'Best First'.
Re^2: threads::shared locking via C API
by halfcountplus (Hermit) on Aug 24, 2011 at 17:33 UTC
    I need to use the lock in the Inline::C parts and the regular perl parts. If the implementation uses pthreads that's great, but I still need to identify the actual mutexes used by the interpreter.