| 142 | } |
| 143 | |
| 144 | void market::wait_workers () { |
| 145 | // usable for this kind of scheduler only |
| 146 | __TBB_ASSERT(governor::needsWaitWorkers(), NULL); |
| 147 | // wait till terminating last worker decresed my_ref_count |
| 148 | while (__TBB_load_with_acquire(my_ref_count) > 1) |
| 149 | __TBB_Yield(); |
| 150 | __TBB_ASSERT(1 == my_ref_count, NULL); |
| 151 | release(); |
| 152 | } |
| 153 | |
| 154 | arena& market::create_arena ( unsigned max_num_workers, size_t stack_size ) { |
| 155 | market &m = global_market( max_num_workers, stack_size ); // increases market's ref count |
no test coverage detected