Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

DEBUGMONITOR's threads?

May
12,846
164
When I do

Code:
debugmonitor 2 echo %%_outputdebugstring

I get two threads.

1581457657468.png


[It seems a bit funny that they have the same start address.] Anyway, when two strings have been reported, only one of those threads terminates. I can force the other to terminate with

Code:
debugmonitor /c

If I don't do that and execute "debugmonitor 2 ..." many times, I wind up with

1581458118202.png


And allowing more than one DEBUGMONITOR doesn't seem like a good idea. When they're all in the same TCC, you can't get rid of all the threads. If they're in different TCC's this happens (which is odd but expected).

1581458299925.png
 
That's not what's happening.

DEBUGMONITOR creates one thread. An additional thread gets created the first time you run one of the monitoring functions. (If you'll recall, you complained previously about that thread running when you hadn't run any monitoring commands, so it doesn't get created until it's actually needed.)
 
I don't understand your comment and I don't think I mis-observed or misspoke. I'll try again. In a new session, issue

Code:
debugmonitor 2 echo %%_outputdebugstring

Now I have this, two threads with the same address..

1581469285390.png


Provide 2 debug strings:

Code:
echo %@debug[foobar] & delay 1 & echo %@debug[foobar]

One of those threads exits.

1581469441414.png


Now issue

Code:
debugmonitor /c

The other thread at VScrput+0x1d210 exits (leaving no extra threads).

*****************************
Another one: run this btm in a new instance.

Code:
do i=1 to 4
    debugmonitor 2 `echo foo > nul`
    delay 1
    echo %@debug[foo] > nul
    delay 1
    echo %@debug[foo] > nul
    delay 1
enddo

When I run it I wind up with.

1581470010632.png
 
That's unlike (say) FOLDERMONITOR. After issuing

Code:
FOLDERMONITOR t:\ CREATED DELETED RENAMED MODIFIED 5 echo %%_foldertime %%_folderaction %%_folderfile

I have

1581471864249.png


When the N=5 transactions have been processed, BOTH of those threads terminate.
 
Back
Top