Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Race conditions in Stata do files?


From   David Kantor <[email protected]>
To   [email protected]
Subject   Re: st: Race conditions in Stata do files?
Date   Tue, 13 Jan 2004 16:36:22 -0500

At 11:32 AM 1/13/2004 -0800, Daniel Sabath wrote:
I have a question that is a little odd and geeky.

If I have a master do file which calls a bunch of other do files, at what
point are those subsidiary do files read into memory?

Assume
Master.do -> proc1.do
          -> proc2.do
          -> proc3.do

Assume that proc2.do takes some time to process. Are proc1-3 read into
memory at the time that master.do is run or are they loaded as they are
called in order. In other words is it possible to start master.do, edit
proc3.do before it is called and have the changes take effect when it is
called?

Thanks

Dan
I've never tried it, but it seems to me that that will work -- that you can edit proc3.do before it is called and have the changes take effect when it is called.

I would assume that master.do is read and executed in sequence, and that it will invoke (and read) proc3 at the time it gets to it.

You might want to runs some tests, putting -sleep- or -pause- into master.do. I'd like to know what the results are.

(The behavior in question contrasts with programs, which are loaded at once and then executed later. But if a program invokes a do-file, then that do-file should be opened up at the time that the executing program gets to that point. So it still should behave as you expected. But if a program or do file invokes an already-loaded program, then that is a different matter.)

-- David

David Kantor
Institute for Policy Studies
Johns Hopkins University
[email protected]
410-516-5404

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index