On Sat, Jan 23, 2010 at 5: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.

With this change, the hang goes away:

C:\work.ooRexx\wc\main>svn diff interpreter
Index: interpreter/runtime/InterpreterInstance.cpp
===================================================================
--- interpreter/runtime/InterpreterInstance.cpp (revision 5502)
+++ interpreter/runtime/InterpreterInstance.cpp (working copy)
@@ -206,9 +206,7 @@

     // 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();
+
     // resource lock must come AFTER we attach the thread, otherwise
     // we can create a deadlock situation when we attempt to get the kernel
     // lock
@@ -258,7 +256,7 @@
     ActivityManager::returnActivity(activity);

     // Was this the last detach of an thread?  Signal the shutdown event
-    if (allActivities->items() == 0 && terminating)
+    if (allActivities->items() <= 1 && terminating)
     {
         terminationSem.post();
     }

C:\work.ooRexx\wc\main>

------------------------------------------------------------------------------
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