Răsfoiți Sursa

stdpy: support name and daemon properties in threading2 module

rdb 6 ani în urmă
părinte
comite
bb3bfebdc2
1 a modificat fișierele cu 3 adăugiri și 0 ștergeri
  1. 3 0
      direct/src/stdpy/threading2.py

+ 3 - 0
direct/src/stdpy/threading2.py

@@ -602,6 +602,9 @@ class Thread(_Verbose):
         assert not self.__started, "cannot set daemon status of active thread"
         self.__daemonic = daemonic
 
+    name = property(getName, setName)
+    daemon = property(isDaemon, setDaemon)
+
 # The timer class was contributed by Itamar Shtull-Trauring
 
 def Timer(*args, **kwargs):