I am using Apache/2.4.41 (Ubuntu), with mod_perl. Apache uses multiple threads, and I want to share read/WRITE data between threads. In "Practical mod_perl" Stas Bekman describes how to share read-only data between threads, but says nothing about how to share WRITABLE data between threads, so that one thread can modify data that all threads see.
How can this be done, and what mechanisms are available -- such as locks or semaphores -- to coordinate shared data access between threads?