-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't working
Description
I've tried this with the following two python files:
callee.py:
import socklocks
if __name__ == '__main__':
with socklocks.SocketLock('my_test_lock'):
print('Callee')
caller.py:
import socklocks
import subprocess
import os
import time
import sys
if __name__ == '__main__':
with socklocks.SocketLock('my_test_lock'):
proc = subprocess.Popen(fr'python {os.path.join(os.getcwd(), "callee.py")}', stdout = sys.stdout, stderr = sys.stderr, text = True)
time.sleep(5)
print("Caller")
And upon running caller.py, I get this:
Callee
[5 sec break]
Caller
But from my understading of SocketLock's purpose, the callee should wait for the caller to exit the lock context before it can enter. Have I done anything wrong?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working