Click to See Complete Forum and Search --> : Asyncrhonus Socket Calls


jparsons
May 13th, 2002, 11:26 PM
In C# I am writing some socket programs and using the Async callback methods. I can't seem to find any definitive answer to this. Do the callback methods always execute on a different thread from the one that setup the callbacks? Thanks


Jared Parsons

nvannote
May 14th, 2002, 01:10 AM
I would assume so, considering that the thread that setup the callback has little control of the thread that performs the callback, and in contrast the thread performing the callback has no control of the thread that requested the callback, or what type of state that thread may be in.

Regards

nvannote
May 14th, 2002, 02:03 AM
In my previous post, I guess what I am trying to say is that a callback in the traditional sense is always executed in the context of the calling thread, all in all, it is just another function call, nothing special.

jparsons
May 14th, 2002, 07:58 AM
I would think it would happen that way. The documentation was a little ambiguous in this sense. The only other way that I could think it would happenw ould be similar to a Unix Interrupt.

Jared Parsons