fix: deadlock in IO.Promise.resolve (#3693)
This commit is contained in:
parent
3ab1c23500
commit
afbf8759e1
1 changed files with 1 additions and 0 deletions
|
|
@ -788,6 +788,7 @@ public:
|
|||
void resolve(lean_task_object * t, object * v) {
|
||||
unique_lock<mutex> lock(m_mutex);
|
||||
if (t->m_value) {
|
||||
lock.unlock(); // `dec(v)` could lead to `deactivate_task` trying to take the lock
|
||||
dec(v);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue