Re: [Algorithms] General purpose task parallel threading approach
Brought to you by:
vexxed72
|
From: Jon W. <jw...@gm...> - 2009-04-04 23:14:12
|
asy...@gm... wrote: > I didn't get what problems you've met with task cancelling, I just > return special code from the blocking function (as you did as well), > whether to throw an exception or not in this case is up to the user. > Could you also point me to any other potential problems you've > experienced with such approaches ? It mostly has to do with the ease of creating bugs. The two bugs we've seen again and again are: 1) Some programmer failing to handle the "cancel" error case correctly, and perhaps treating it like a temporary I/O error rather than unwinding ASAP. 2) Some programmer deleting the underlying object that uses the fiber, while the fiber is still waiting in the scheduling queue. This is extra nasty to debug when it happens in an asynchronous manner. Sincerely, jw |