August 2017
Intermediate to advanced
438 pages
14h 19m
English
We do not block at all. Instead of blocking, we count the tasks that finished filling the data. This is done by the counter atomic variable. The last remaining task will have a counter variable equal to data_t::static_size. Only that task must compute and send the data.
After that, we check for the exit condition (1000 iterations are done) and post the new data by pushing tasks to the queue.
Read now
Unlock full access