Do not use peekIsCompleted in isQueueBlocked.

- This causes event tree update if virtual event is holding commands or
callbacks
- That causes race between other threads that may be updating the tree

Change-Id: Ic80a8b71ed1e1c1deab8af1bc64f8ce81c21de1b
This commit is contained in:
Mrozek, Michal
2017-12-20 10:20:17 +01:00
parent 7e9ad41290
commit 3284efff86
5 changed files with 45 additions and 9 deletions

View File

@ -164,7 +164,7 @@ bool CommandQueue::isQueueBlocked() {
TakeOwnershipWrapper<CommandQueue> takeOwnershipWrapper(*this);
//check if we have user event and if so, if it is in blocked state.
if (this->virtualEvent) {
if (this->virtualEvent->peekIsCompleted()) {
if (this->virtualEvent->peekExecutionStatus() <= CL_COMPLETE) {
UNRECOVERABLE_IF(this->virtualEvent == nullptr);
if (this->virtualEvent->peekIsCompletedByTermination() == false) {