コード例 #1
0
	def _thread_state(self):
		"""If we're in the same thread, we need to grab the state from the master Py object.
		Otherwise we rip it from the thread itself. 
		We'll also want this to be calculated every call to ensure it's the correct reference. 
		"""
		if Thread.currentThread() is self._target_thread:
			return Py.getThreadState()
		else:
			return getThreadState(self._target_thread)