If I have an object that has been initialized in one thread of
execution, and I create another thread of execution that calls a method
on that object, does that method execute in the first thread of
execution?
Based on initial observations of thread behavior in an application I am
developing, it does. I'm just looking for some clarification.
VisionSet - 22 May 2006 22:56 GMT
> If I have an object that has been initialized in one thread of
> execution, and I create another thread of execution that calls a method
[quoted text clipped - 3 lines]
> Based on initial observations of thread behavior in an application I am
> developing, it does. I'm just looking for some clarification.
When you call a method from a thread, it executes in that thread period.
So with you example, no, the 2nd thread.
--
Mike W
jmcgill - 22 May 2006 23:03 GMT
> Based on initial observations of thread behavior in an application I am
> developing, it does. I'm just looking for some clarification.
I think you may be misinterpreting your observations.
rubikzube* - 22 May 2006 23:15 GMT
I must be... Hmm. Thanks for the reply. I'm going to go back and take
a closer look at what is going on.
rubikzube* - 23 May 2006 08:46 GMT
Aha! I was calling thread.run() instead of thread.start(). Thank you
for your help.