As Arjay has pointed out, such an implementation will work only within the threads of one single process. It will not work across different processes.