(self)
| 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 | |
| 374 | class BarrierTest(BasicThreadTest): |
no test coverage detected