Cross platform mutex to prevent script running more than instance?

Malcolm Greene python at bdurham.com
Sun Sep 2 15:45:32 EDT 2018


Use case: Want to prevent 2+ instances of a script from running ... ideally in
a cross platform manner. I've been researching this topic and am surprised how
complicated this capability appears to be and how the diverse the solution set
is. I've seen solutions ranging from using directories, named temporary files, 
 named sockets/pipes, etc. Is there any consensus on best practice here? Thank
you,
Malcolm




More information about the Python-list mailing list