Thinking about this problem, the best understandable solution would probably be to insert an invocation exit traceline in the thread right before starting to spawn in RexxActivation.

A test implementation would show the following output:

         1 *-* .traceObject~option="T" -- from now on display thread id in 
prefix
         2 *-1* t=.test~new
         3 *-1* t~test_reply
           *>I1>*  Method "TEST_REPLY" with scope "TEST" in package 
"G:\test\orx\trace\test_reply.rex".
         7 *-1* say "before reply ..."
   before reply ...
         8 *-1* reply
          *<I1< *Method "TEST_REPLY" with scope "TEST" in package 
"G:\test\orx\trace\test_reply.rex".
           >I2> Method "TEST_REPLY" with scope "TEST" in package 
"G:\test\orx\trace\test_reply.rex".
         9 *-2* say "after reply ..."
   after reply ...
           *<I2<*  Method "TEST_REPLY" with scope "TEST" in package 
"G:\test\orx\trace\test_reply.rex".

As can be seen the invocation enter and exit tracelines now match, also with respect to the respective thread ids.

---rony


On 20.04.2024 13:59, Rony G. Flatscher wrote:

Given the following program:

    .traceObject~option="T" -- from now on display thread id in prefix
    t=.test~new
    t~test_reply

    ::class test
    ::method test_reply
       say "before reply ..."
       reply
       say "after reply ..."

    ::options trace all

Running it will yield:

          1 *-* .traceObject~option="T" -- from now on display thread id
          2 *-1* t=.test~new
          3 *-1* t~test_reply
            >I1> Method "TEST_REPLY" with scope "TEST" in package 
"G:\test\orx\trace\test_reply.rex".
          7 *-1* say "before reply ..."
    before reply ...
          8 *-1* reply
           *>I2> Method "TEST_REPLY" with scope "TEST" in package 
"G:\test\orx\trace\test_reply.rex".*
          9 *-2* say "after reply ..."
    after reply ...
            <I2< Method "TEST_REPLY" with scope "TEST" in package 
"G:\test\orx\trace\test_reply.rex".

The ">I2>" traceline after line # 8 is probably caused by spawning a new activity to process the remainder of the method's code.

However, this is a little bit misleading for the Rexx programmer as there is /no /new invocation taking place, rather it is a continuation of the remainder on a new thread/activity. (In the current form there is also no matching "<I1<" trace line.)

How about either removing ">I2>" or inserting an "<I1<" right before it or changing ">I2>" to ">T2>" (">T>") a new prefix indicating that the remainder gets executed on a new thread/activity), if possible?

What do you think?

---rony

_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to