[mlir:async] Fix deadlock in async runtime await-and-execute functions
authorEugene Zhulenev <ezhulenev@google.com>
Wed, 27 Jan 2021 12:27:21 +0000 (04:27 -0800)
committerEugene Zhulenev <ezhulenev@google.com>
Wed, 27 Jan 2021 13:08:53 +0000 (05:08 -0800)
commitf63f28ed54e724128e61fb22185ce6b167b29de0
tree45cb6ee523561965ee57952b3647ed4e1be9906f
parente2a1a718bbe406289adb695348d2cf8085dfaf25
[mlir:async] Fix deadlock in async runtime await-and-execute functions

`emplace???` functions running concurrently can set the ready flag and then pending awaiter will never be executed

Differential Revision: https://reviews.llvm.org/D95517
mlir/lib/ExecutionEngine/AsyncRuntime.cpp