M
minnmaxx
I have the following piece of code:
// this called when some data comes in
public void OnReceive( IAsyncResult ar )
{
// receive data
string message = ...;
// continue to listen
BeginReceive( ... );
// process string based on some condition
if ( condition )
{
ComplicatedProcessor( message );
}
else
{
QuickProcessor( message );
}
}
my question is: If the code ends up calling ComplicatedProcessor, and
before ComplicatedProcessor returns, there's an incoming message, will
OnReceive be able to be called again?.. meaning while the 1st
OnReceive's still running, can a 2nd one start?
// this called when some data comes in
public void OnReceive( IAsyncResult ar )
{
// receive data
string message = ...;
// continue to listen
BeginReceive( ... );
// process string based on some condition
if ( condition )
{
ComplicatedProcessor( message );
}
else
{
QuickProcessor( message );
}
}
my question is: If the code ends up calling ComplicatedProcessor, and
before ComplicatedProcessor returns, there's an incoming message, will
OnReceive be able to be called again?.. meaning while the 1st
OnReceive's still running, can a 2nd one start?
around the problem?From my experiment, the answer is no. Everyone know how can I get