Jer
Jer
CC#
Created by Jer on 10/1/2023 in #help
❔ Task tracking
Thanks for your help! @David_F
13 replies
CC#
Created by Jer on 10/1/2023 in #help
❔ Task tracking
Yeah I’m passing down the CT everywhere. I just want to do the most I can to process anything that was sent while the HttpListener was still processing even though the application was already gracefully being shut down
13 replies
CC#
Created by Jer on 10/1/2023 in #help
❔ Task tracking
I’ve increased the shutdown timeout
13 replies
CC#
Created by Jer on 10/1/2023 in #help
❔ Task tracking
(assuming the ConcurrentBag<T> locks on add/remove)
13 replies
CC#
Created by Jer on 10/1/2023 in #help
❔ Task tracking
Yeah that should be sufficient, although it might slow down the performance overall due it locking whenever any task finishes whereas with the manual lock it’s only on shutdown a single lock op until Task.WhenAll finishes
13 replies
CC#
Created by Jer on 10/1/2023 in #help
❔ Task tracking
(lock only just before calling Task.WhenAll()) to ensure exclusive access from the shutdown sequence)
13 replies
CC#
Created by Jer on 10/1/2023 in #help
❔ Task tracking
Thanks! This would mean I’d have to lock on the List though. Right? Otherwise when I iterate it on shutdown the collection might be modified by the continuation during iteration of Task.WhenAll()
13 replies