Re: GThread cancellation



Hi Andres,

> It seems to be a necessary evil when dealing with functions that have the
> potentional to block indefinitely (libc, xlib, etc).

But using deferred cancellation (and using asynchronous cancellation is
strongly discouraged [apart from some very few and limited cases]) you
have no guarantee either, that those threads are canceled, because they
have to wait until they encounter cancellation points. Also I would
argue, that a function, which could hang indefinitely is broken.....
There are always timeouts, or am I missing something.

> >> Is there any particular reason why GThread doesn't have anything
> >> similar to pthread's pthread_cancel(), other than the difficulty of
> >> implementing such a beast?
> >
> > I personally think, that thread cancellation is quite a bad idea. While
> > I'm not completely against it in GLib, I'm sure including it makes a
> > portable thread abstraction much harder with (in my mind) minimal gain.

Bye,
Sebastian

-- 
Sebastian Wilhelmi                 |            här ovanför alla molnen
mailto:seppi seppi de              |     är himmlen så förunderligt blå
http://seppi.de




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]