Without risking the case of the 2 tasks running on the same thread and having them both stopped.
I want the first task to wait until another task finishes some action. After the second task is done with its action, it should wake the first task up and continue working from where it stopped. The first task should be waked up as well if the first task didn't do the action after a certain time.
Now, the major problem I am having is that since both are tasks, not threads, most solutions I found looks like they stop the thread, not the task only. So, it could be the case that both tasks be running on the same thread, and thus when I make the first task wait, both wait and it timeouts anyway.
Finding it funny that MS is urging IT admins as if this was a big, significant update. No new features, just an enablement package that will bump up the build number again, which is a shame considering 22H2 and 24H2 were significant updates. Technically, 25H2, 26H1, and the upcoming 26H2 are all the same with different support schedules. They could've ship the Windows K2 improvements in this update but they chose not to.
The era of Windows being in the backburner continues, and this 26H2 update feels like an afterthought. Shame Nadella, shame.
After I installed those, my older but capable Win 11 laptop (16GB RAM) reported it as 26H2 26300.8697.
Then I installed it on my big laptop (128GB RAM! Hehe sorry), it reported it as 25H2 26220.8690. Ugh. Do I have to switch Insiders channels from Release to Beta?
Question
kInG aLeXo
Without risking the case of the 2 tasks running on the same thread and having them both stopped.
I want the first task to wait until another task finishes some action. After the second task is done with its action, it should wake the first task up and continue working from where it stopped. The first task should be waked up as well if the first task didn't do the action after a certain time.
Now, the major problem I am having is that since both are tasks, not threads, most solutions I found looks like they stop the thread, not the task only. So, it could be the case that both tasks be running on the same thread, and thus when I make the first task wait, both wait and it timeouts anyway.
Is there a clean solution around this ?
Thanks;
Link to comment
https://www.neowin.net/forum/topic/1133908-c-how-to-make-a-task-wait-until-other-task-wakes-it-up-or-timeout/Share on other sites
4 answers to this question
Recommended Posts