Re: [Algorithms] General purpose task parallel threading approach
Brought to you by:
vexxed72
|
From: <asy...@gm...> - 2009-04-05 17:23:41
|
>1) Some programmer failing to handle the "cancel" error case correctly, For that purpose I made by default a wait operation not cancellable. You have to provide a flag in order to be have an ability to cancel current wait operation (and have a 'cancelled' flag returned) Alexander. 2009/4/5 Jon Watte <jw...@gm...> > 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 > > > > ------------------------------------------------------------------------------ > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > -- Regards, Alexander Karnakov |