Skip to content

Possible deadlock when TaskManager::count is called in onFinished #1180

@phirg

Description

@phirg

Hello,
for verbosity purpose, I had a call to TaskManager::count() in a method onFinished called on TaskFinishedNotification. At the same time, I had a loop in the main thread, calling periodically TaskManager::count() too.

Sometimes, it resulted in a dead lock.

From my multi-threading-newbie understanding, it seems that during the notification, a lock happen, and during the count(), another lock happen, and the two of them would block each other sometimes for simultaneous multiple calls.

So, then, what are the cases where the deadlock could possibly occur regarding those calls?

Thank you very much for any help you could provide...

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions