title: How to configure alternative to `/dev/shm/` or `_multiprocessing.SemLock` in Python
body: <p><strong>Query</strong> : Is there any way in Python to say:</p>
  
  <ul>
  <li><p>Don't use <code>/dev/shm</code> for shared memory storage and use some other temporary location such as <code>/tmp</code> instead. <strong>OR</strong></p></li>
  <li><p>Instead of <code>multiprocessing.SemLock</code> use <code>threading.Lock</code> for synchronization (if it's feasible and not illogical).</p></li>
  </ul>
  
  <p><strong>Background</strong>:</p>
  
  <p>I am running a simple <code>multiprocessing.Pool</code> example on an ESX (hypervisor) which is running into <a href="https://stackoverflow.com/questions/6033599/oserror-38-errno-38-with-multiprocessing">OSError : Function not implemented error</a>.</p>
  
  <p>Other mentions to this problem (<a href="https://stackoverflow.com/questions/6033599/oserror-38-errno-38-with-multiprocessing">here</a> and <a href="https://stackoverflow.com/questions/34005930/multiprocessing-semlock-is-not-implemented-when-running-on-aws-lambda">here</a>) on StackOverflow have pointed out that it happens when <code>/dev/shm</code> is not mounted. Due to which, <code>_multiprocessing.SemLock</code>fails to create synchronization lock(s). </p>
  
  <p>It is actually the case for me as <code>ls -lrt /dev/shm</code> fails for me. However I cannot try the solutions recommended on the above links as</p>
  
  <ul>
  <li><p><code>mount</code> as mount command is not implemented on the platform (ESX/VMKernel) I am running on. </p></li>
  <li><p>VM is not persistent and <code>/etc/fstab</code> gets washed away on shutdown itself.</p></li>
  </ul>
  
  <p>So I am looking for ways to either use threading.Lock() for synchronization or ask Python to not to use <code>/dev/shm/</code> for synchronization.</p>