Take a look at mutexes in perl e.g. APR::ThreadMutex or Threads::Shared
If you need to share data between threads then the principle is to mutually exclude all other threads from modifying that data while you transfer it.
Just set up a mutual exclusion and be religious about gaining and releasing it. You may not need to gain and release in the same subroutine.
In reply to Re^3: Problem in Inter Process Communication
by LesleyB
in thread Problem in Inter Process Communication
by libvenus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |