2323# with the multiprocessing module, which doesn't provide the old
2424# Java inspired names.
2525
26- __all__ = ['get_ident' , 'get_native_id ' , 'active_count ' , 'Condition ' ,
27- 'current_thread' , ' enumerate' , 'main_thread' , 'TIMEOUT_MAX' ,
26+ __all__ = ['get_ident' , 'active_count ' , 'Condition ' , 'current_thread ' ,
27+ 'enumerate' , 'main_thread' , 'TIMEOUT_MAX' ,
2828 'Event' , 'Lock' , 'RLock' , 'Semaphore' , 'BoundedSemaphore' , 'Thread' ,
2929 'Barrier' , 'BrokenBarrierError' , 'Timer' , 'ThreadError' ,
3030 'setprofile' , 'settrace' , 'local' , 'stack_size' ]
3434_allocate_lock = _thread .allocate_lock
3535_set_sentinel = _thread ._set_sentinel
3636get_ident = _thread .get_ident
37- get_native_id = _thread .get_native_id
3837ThreadError = _thread .error
3938try :
4039 _CRLock = _thread .RLock
@@ -791,7 +790,6 @@ class is implemented.
791790 else :
792791 self ._daemonic = current_thread ().daemon
793792 self ._ident = None
794- self ._native_id = 0
795793 self ._tstate_lock = None
796794 self ._started = Event ()
797795 self ._is_stopped = False
@@ -893,9 +891,6 @@ def _bootstrap(self):
893891 def _set_ident (self ):
894892 self ._ident = get_ident ()
895893
896- def _set_native_id (self ):
897- self ._native_id = get_native_id ()
898-
899894 def _set_tstate_lock (self ):
900895 """
901896 Set a lock object which will be released by the interpreter when
@@ -908,7 +903,6 @@ def _bootstrap_inner(self):
908903 try :
909904 self ._set_ident ()
910905 self ._set_tstate_lock ()
911- self ._set_native_id ()
912906 self ._started .set ()
913907 with _active_limbo_lock :
914908 _active [self ._ident ] = self
@@ -1083,17 +1077,6 @@ def ident(self):
10831077 assert self ._initialized , "Thread.__init__() not called"
10841078 return self ._ident
10851079
1086- @property
1087- def native_id (self ):
1088- """Native integral thread ID of this thread or 0 if it has not been started.
1089-
1090- This is a non-negative integer. See the get_native_id() function.
1091- This represents the Thread ID as reported by the kernel.
1092-
1093- """
1094- assert self ._initialized , "Thread.__init__() not called"
1095- return self ._native_id
1096-
10971080 def is_alive (self ):
10981081 """Return whether the thread is alive.
10991082
@@ -1193,7 +1176,6 @@ def __init__(self):
11931176 self ._set_tstate_lock ()
11941177 self ._started .set ()
11951178 self ._set_ident ()
1196- self ._set_native_id ()
11971179 with _active_limbo_lock :
11981180 _active [self ._ident ] = self
11991181
@@ -1213,7 +1195,6 @@ def __init__(self):
12131195
12141196 self ._started .set ()
12151197 self ._set_ident ()
1216- self ._set_native_id ()
12171198 with _active_limbo_lock :
12181199 _active [self ._ident ] = self
12191200
0 commit comments