Esempio n. 1
0
 def check_thread(self):
     if self.tid != _thread.get_ident():
         raise ValueError(
             '{} was created on T{}, but T{} attempted an access'.format(
                 self, self.tid, _thread.get_ident()))
Esempio n. 2
0
 def __init__(self):
     self.tid = _thread.get_ident()