logo       
Google Custom Search
    AddThis Social Bookmark Button

RE: assess what subroutines are currently being called: msg#00008

Subject: RE: assess what subroutines are currently being called
Sound like you are trying to figure out the name of a calling
subroutine, is that correct?
If so you can try using the caller() function. See the perldocs on this
to get specifics on 
the arguments and return values for this function.

Mike 

-----Original Message-----
From: ptk-bounces@xxxxxxxxxxxxxxxxxxxx
[mailto:ptk-bounces@xxxxxxxxxxxxxxxxxxxx] On Behalf Of listmail
Sent: Wednesday, April 11, 2007 10:38 AM
To: Perl TK Mailing List
Subject: Re: assess what subroutines are currently being called

I had assumed that if an event was running a sub and if the client
pressed a widget button which also called a sub that the subs would
execute in parallel. If it is actually that a button (-command) call
would actually have to wait for the event sub (if already running) to
return, then this would mean there is no need for what I am attempting.

My thougthts where was that I should get the program to exit gracefully
if a client hasn't responded to a program update notification (afk). I
didn't want to disconnect databases and call and exit if the user was in
the middle of running a subroutine associated to a widget he had
pressed.

Hope that clears my question up a little.




Ala Qumsieh wrote:
> --- listmail <listmail@xxxxxxxxxxxx> wrote:
>
>   
>> I have a top level widget event timer that calls a sub routine 
>> periodically and does some checks.
>>
>> I'd like to add some code, for specific reasons, to be able to assess

>> what other subroutines are currently being executed with the 
>> mainloop.
>> Is this possible?  I'd expect the call to always indicate the event 
>> sub to be running so any additional subs is what I am interested in.
>>     
>
> Not sure what you mean. Unless you're using threads, there is only one

> active subroutine at any one time.
> But, here's an idea. You can use global variables to track your 
> progress. At the beginning of a subroutine, set the value of a 
> specific var to 1. At the end set to 0. It's not pretty, but should be

> good 99% of the time.
>
> --Ala
>
>
>
>        
> ______________________________________________________________________
> ______________
> TV dinner still cooling? 
> Check out "Tonight's Picks" on Yahoo! TV.
> http://tv.yahoo.com/
>
>   

--++**==--++**==--++**==--++**==--++**==--++**==--++**==
ptk mailing list
ptk@xxxxxxxxxxxxxxxxxx
https://mailman.stanford.edu/mailman/listinfo/ptk

--++**==--++**==--++**==--++**==--++**==--++**==--++**==
ptk mailing list
ptk@xxxxxxxxxxxxxxxxxx
https://mailman.stanford.edu/mailman/listinfo/ptk





Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>