2

does the file which is sent as an argument to execfile runs as an independent process / thread or is the code imported and then executed ? . Also i wanted to know how efficient is it compared to running threads / process .

asked Oct 27, 2010 at 13:19
2
  • "compared to running threads / process". It can't be compared. Why do you ask? Commented Oct 27, 2010 at 13:50
  • well i didnt know , it cant be compared . the reason i asked was to know how actually it works , since i come from c/c++ background i thought this would work similar to inline function concept or so , which i m unsure of. Commented Oct 29, 2010 at 10:00

1 Answer 1

2

The file is not run in a separate thread or process, it runs synchronously with the caller.

answered Oct 27, 2010 at 13:23
Sign up to request clarification or add additional context in comments.

3 Comments

well can u elaborate a bit on that . Is it that the code in the file is imported via execfile() and after execution the the next instruction in the parent file is executed ?
yes, exactly. You might try experimenting with it to see how it behaves for your application.
"try experimenting". Good suggestion.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.