MCPcopy Index your code
hub / github.com/python/cpython / enter

Method enter

Lib/test/test_thread.py:357–371  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

355 self.checkout_mutex.acquire()
356
357 def enter(self):
358 self.checkin_mutex.acquire()
359 self.waiting = self.waiting + 1
360 if self.waiting == self.num_threads:
361 self.waiting = self.num_threads - 1
362 self.checkout_mutex.release()
363 return
364 self.checkin_mutex.release()
365
366 self.checkout_mutex.acquire()
367 self.waiting = self.waiting - 1
368 if self.waiting == 0:
369 self.checkin_mutex.release()
370 return
371 self.checkout_mutex.release()
372
373
374class BarrierTest(BasicThreadTest):

Callers 10

hFunction · 0.45
d3.min.jsFile · 0.45
cFunction · 0.45
IFunction · 0.45
task2Method · 0.45
test_enterMethod · 0.45
test_enter_concurrentMethod · 0.45
test_run_non_blockingMethod · 0.45

Calls 2

acquireMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected