> How can I also do it in linux? Use semaphores. There is a semaphore implementation for LINUX, Windows, BeOS and probably most other Unices. Certainly, any platform that conforms to POSIX and/or PThreads will have a semaphore implementation. The mechanics will be different - the idea will be universal. M