Browse Source

stdpy: fix broken threading.Event

rdb 7 years ago
parent
commit
f813d2fb60
1 changed files with 2 additions and 2 deletions
  1. 2 2
      direct/src/stdpy/threading.py

+ 2 - 2
direct/src/stdpy/threading.py

@@ -312,7 +312,7 @@ class Event:
     object. """
     object. """
 
 
     def __init__(self):
     def __init__(self):
-        self.__lock = core.Lock("Python Event")
+        self.__lock = core.Mutex("Python Event")
         self.__cvar = core.ConditionVarFull(self.__lock)
         self.__cvar = core.ConditionVarFull(self.__lock)
         self.__flag = False
         self.__flag = False
 
 
@@ -325,7 +325,7 @@ class Event:
         self.__lock.acquire()
         self.__lock.acquire()
         try:
         try:
             self.__flag = True
             self.__flag = True
-            self.__cvar.signalAll()
+            self.__cvar.notifyAll()
 
 
         finally:
         finally:
             self.__lock.release()
             self.__lock.release()