Yes, I was just looking at the same code you were...this is all
screwed up.  I'm not really sure how anything is working!  I believe
that second nestAttach() in the attachThread() code is wrong, but the
size of the comment there tells me I added that for a reason.
However, the only place where the nesting check is performed in is in
the DetachThread() code, which means a DetachThread() operation is
essentially a NOP, so I don't understand why we don't see more hangs.
I recommend removing that nestAttach() call and see if it clears
things up.  We need to make sure we run the entire test suite before
checking that fix in though!

Rick

On Sat, Jan 23, 2010 at 8:18 PM, Mark Miesfeld <[email protected]> wrote:
> On Sat, Jan 23, 2010 at 5:06 PM, Rick McGuire <[email protected]> wrote:
>
>> Hmmmm, this probably requires some tracking on the AttachThread() call
>> to figure out why this is created as a nested attach.
>
> <grin>  That's what I was doing all morning until I had myself
> throughly confused and decided I needed some help from you.
>
> In this section, activity comes back NULL, but then it does a
> nestAttach() anyway.
>
>    // first check for an existing activity
>    RexxActivity *activity = findActivity();
>    // do we have this?  we can just return it
>    if (activity != OREF_NULL)
>    {
>        // make sure we mark this as attached...we might be nested and
> don't want to
>        // clean this up until we complete
>        activity->nestAttach();
>        return activity;
>    }
>
>    // we need to get a new activity set up for this particular thread
>    activity = ActivityManager::attachThread();
>    // this is still attached, but we'll release it once it is
> detached.  We start with
>    // a count of 1 and cleanup once we hit zero.
>    activity->nestAttach();
>
> What I did was comment out the last activity->nestAttach() and then
> change the other test to allActivities->items() <= 1 and the hang went
> away.  But, I wasn't / am not sure if that last nestAttach() needs to
> be there because of the comment.
>
> --
> Mark Miesfeld
>
> ------------------------------------------------------------------------------
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for Conference
> attendees to learn about information security's most important issues through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to