Query : Is there any way in Python to say:
Don't use
/dev/shm
for shared memory storage and use some other temporary location such as/tmp
instead. ORInstead of
multiprocessing.SemLock
usethreading.Lock
for synchronization (if it's feasible and not illogical).
Background:
I am running a simple multiprocessing.Pool
example on an ESX (hypervisor) which is running into OSError : Function not implemented error.
Other mentions to this problem (here and here) on StackOverflow have pointed out that it happens when /dev/shm
is not mounted. Due to which, _multiprocessing.SemLock
fails to create synchronization lock(s).
It is actually the case for me as ls -lrt /dev/shm
fails for me. However I cannot try the solutions recommended on the above links as
mount
as mount command is not implemented on the platform (ESX/VMKernel) I am running on.VM is not persistent and
/etc/fstab
gets washed away on shutdown itself.
So I am looking for ways to either use threading.Lock() for synchronization or ask Python to not to use /dev/shm/
for synchronization.