-
- Downloads
Fixing vtkThreadedCallbackQueue deadlock
When one is calling `Wait()` on a future, the future will try to un its priors if they are enqueued (not on hold) using a constant-time lookup through the `InvokerIndex` member. There was a race condition with the regular path for running tasks. The queue could try to run the prior while the user does it as well. When this happens, the computed index in the queue is negative (because the prior has been popped in the regular pathe). When such occurenc happens, we abandon trying to run the prior. Setting the invoker's status to `RUNNING` was done in `Invoke()`. It turns out that there are cases when we want to set it befor calling `Invoke()`. From now on, each part of the code about to invoke is responsible for updating its status.
Showing
- Parallel/Core/vtkThreadedCallbackQueue.cxx 41 additions, 14 deletionsParallel/Core/vtkThreadedCallbackQueue.cxx
- Parallel/Core/vtkThreadedCallbackQueue.h 1 addition, 2 deletionsParallel/Core/vtkThreadedCallbackQueue.h
- Parallel/Core/vtkThreadedCallbackQueue.txx 5 additions, 4 deletionsParallel/Core/vtkThreadedCallbackQueue.txx
Loading
Please register or sign in to comment