(cond, count, num_threads, ctx, mode)
| 977 | num_threads = 10 |
| 978 | |
| 979 | def execution_mode_test(cond, count, num_threads, ctx, mode): |
| 980 | cond.acquire() |
| 981 | # Ensure that all threads set their mode simultaneously |
| 982 | # Note that this is not a simple assignment, as the execution_mode is an |
| 983 | # @property with a custom setter. |
| 984 | ctx.execution_mode = mode |
| 985 | count[0] = count[0] + 1 |
| 986 | if count[0] < num_threads: |
| 987 | cond.wait() |
| 988 | else: |
| 989 | cond.notify_all() |
| 990 | cond.release() |
| 991 | self.assertEqual(ctx.execution_mode, mode) |
| 992 | |
| 993 | ctx = context.Context() |
| 994 | threads = [] |
nothing calls this directly
no test coverage detected