MINOR: task: put barriers after each write to curr_task

This one may be watched by signal handlers, we don't want the compiler
to optimize its assignment away at the end of the loop and leave some
wandering pointers there.
1 file changed