This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/28145] C++ (throw() and catch(...) {/* fall through */ } ) and pthread cancellation are incompatible (at least with NPTL)



------- Comment #14 from hhinnant at apple dot com  2006-11-01 23:33 -------
So swallowing a cancel-exception (in C++) is sometimes the right thing to do.

Imagine a thread pool executing a queue of tasks.  These tasks can well have
handles so that clients can wait/join with results in the future.  Such results
could be normal or exceptional.  If you've got a hung task in a thread pool,
maybe you want to cancel it.  That means the task should end, but once the OS
thread dumps the task, records the exception that ended it (cancellation), the
thread should be free to get the next task out of the queue and execute it.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28145


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]