# Mutex in inter-process communication

**URL:** <https://discourse.julialang.org/t/mutex-in-inter-process-communication/74223>\
**Category:** General Usage\
**Created:** [January 7, 2022, 11:52pm UTC](https://discourse.julialang.org/t/mutex-in-inter-process-communication/74223 "2022-01-07T23:52:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandsblair2020](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brandsblair2020/32/32539_2.png) [@brandsblair2020](https://discourse.julialang.org/u/brandsblair2020)\
**Post date:** [January 7, 2022, 11:52pm UTC](https://discourse.julialang.org/t/mutex-in-inter-process-communication/74223/1 "2022-01-07T23:52:10Z")

</div>

hello, there is a package called InterProcessCommunication at [https://github.com/emmt/InterProcessCommunication.jl](https://github.com/emmt/InterProcessCommunication.jl)

Has anyone had any experience in making the Mutex to work with shared memory, i.e. in the lock.jl of the package, the comments in the code:

Keyword `shared` can be set true to create a mutex that is shared between  
processes; otherwise, the mutex is private that is it can only be used by  
threads of the process which creates the mutex. A shared mutex must be stored  
in a part of the memory, like shared memory, that can be shared with other  
processes.

Would be very grateful if anyone can post some sample code to make it work. Many thanks
