Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » ASyncWork/CoWork Cancel() method leads to deadlock (when used with GuiLock)
Re: ASyncWork/CoWork Cancel() method leads to deadlock (when used with GuiLock) [message #50205 is a reply to message #50203] Mon, 27 August 2018 09:47 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I believe the issue is caused by the fact that "Cancel" waits for the job to actually exit.

Now AsyncTest::Stop is GUI event, so when it performs, GuiLock is locked. Cancel has to wait for CoWork to finish - that is important, because often CoWork jobs are referencing local data. Then in your worker job, you attempt to GuiLock too. Obviously, after that Sleep, it is unable to lock GuiLock and result is deadlock.

Now what to do with that, I am not sure... Perhaps we need another form of 'Cancel' (something like 'Abandon') that is not required to wait for job to finish?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to use CoWork and Progress together?
Next Topic: Skylark session verification
Goto Forum:
  


Current Time: Sun Apr 28 07:49:36 CEST 2024

Total time taken to generate the page: 0.07379 seconds