[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Thread bugs
From: |
Federico Montesino Pouzols |
Subject: |
Re: Thread bugs |
Date: |
Thu, 9 Jan 2003 12:55:18 +0100 |
User-agent: |
Mutt/1.4i |
Hi,...
On Wed, Jan 08, 2003 at 08:53:01AM +0200, Ittay Freiman wrote:
> 1. according to the documentation, one should do 'delete this' in
> final(). however, in close() there is a check on 'priv' after calling
> final(). when an application has many threads opening and closing, this
> memory can already be allocated to some other object, thus this check
> will (has for us) fail.
>
Um, that check is done in order to know if priv->_tid may be
set to 0, however, priv->_tid is already set to 0 in terminate. Should
not we remove the check and the priv->_tid = 0, or am I missing
something?
> 2. in terminate() a call to pthread_join() is made. according to the man
> pages, this call is illegal for a detached thread. it does fail
> sometimes for us.
>
Yes, pthread_join should only be called if it is not detached,
which can be checked with pthread_attr_getdetachstate.
> ittay
> --
> Ittay Freiman <address@hidden>
> Qlusters Inc.
>
>
>
> _______________________________________________
> Bug-commoncpp mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp
- Thread bugs, Ittay Freiman, 2003/01/08
- Re: Thread bugs,
Federico Montesino Pouzols <=