At 12:50 AM +0100 11/28/05, Rafael Garcia-Suarez wrote:
>On 11/26/05, Craig A. Berry <[EMAIL PROTECTED]> wrote:
>> But there are other structures that are pipe-specific, and it seems
>> like a good idea to keep the new sanity check that ensures we close a
>> pipe and deallocate its structures from within the same interpreter
>> context where it was opened. But I haven't thought of a good way to
>> do that for the case where the pipe is opened when there is no
>> context at all yet.  Any suggestions?
>
>Looks to me that we should bypass this check when there is no context.

I agree.  What is the best way to do that?  PL_curinterp == NULL?
PL_thr_key == NULL?   It looks to me that dTHX translates to
pthread_getspecific(), which returns an undefined value before the
key is initialized, so we can't depend on dTHX to tell us whether we
actually have a thread context or not.

The case I am most worried about, though, is the one where we
allocate before thread context is initialized and deallocate after
(possibly during global destruction).   Is global destruction
supposed to be smart enough to recognize things that were created
before there was a thread context and deallocate them differently?
-- 
________________________________________
Craig A. Berry
mailto:[EMAIL PROTECTED]

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Reply via email to