Hi:

I'm not too clear on how method calls are handled by referenced
objects.

If an object is referenced in two different places and a call to the
same method is called by both relatively quickly, are different
threads spawn for each caller's method call, or is it a single thread?

thanks for info in advance

Steve

Re: Reference objects and simultaneous calls by Mattias

Mattias
Fri Feb 20 14:20:40 CST 2004

Steve,

>If an object is referenced in two different places and a call to the
>same method is called by both relatively quickly, are different
>threads spawn for each caller's method call, or is it a single thread?

No threads are spawned when you call a method. The called method
executes on the same thread as the caller.



Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Re: Reference objects and simultaneous calls by gs_sarge

gs_sarge
Sat Feb 21 18:23:09 CST 2004

You say on the same thread as the caller. In other words, they are in
different threads; threads on the callers side. Am I understanding
that correctly?

On Fri, 20 Feb 2004 21:20:40 +0100, Mattias Sjögren
<mattias.dont.want.spam@mvps.org> wrote:

>Steve,
>
>>If an object is referenced in two different places and a call to the
>>same method is called by both relatively quickly, are different
>>threads spawn for each caller's method call, or is it a single thread?
>
>No threads are spawned when you call a method. The called method
>executes on the same thread as the caller.
>
>
>
>Mattias
>
>--
>Mattias Sjögren [MVP] mattias @ mvps.org
>http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
>Please reply only to the newsgroup.


Re: Reference objects and simultaneous calls by Mattias

Mattias
Tue Feb 24 16:32:25 CST 2004


>You say on the same thread as the caller. In other words, they are in
>different threads; threads on the callers side. Am I understanding
>that correctly?

Sounds like it, yes (though I'm not sure what "they" are referring
to).



Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Re: Reference objects and simultaneous calls by I_hate_spammers

I_hate_spammers
Wed Feb 25 23:18:45 CST 2004

"They" would be referring to the call on the same method from
different callers who share the same reference to the object on which
they are calling the method.

Thanks for info.

On Tue, 24 Feb 2004 23:32:25 +0100, Mattias Sjögren
<mattias.dont.want.spam@mvps.org> wrote:

>
>>You say on the same thread as the caller. In other words, they are in
>>different threads; threads on the callers side. Am I understanding
>>that correctly?
>
>Sounds like it, yes (though I'm not sure what "they" are referring
>to).
>
>
>
>Mattias
>
>--
>Mattias Sjögren [MVP] mattias @ mvps.org
>http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
>Please reply only to the newsgroup.