Hi,
I would like to know how threads are handled on the server side using MarshalByRef objects.
Given my remoted MarshalByRef class:
public class MyRemotedClass : MarshalByRef
{
public int MyInt;
public string MyString;
}
Client code (single threaded):
MyRemotedClass m = GetSomehowMyRemotedClass();
m.MyInt = 5; // Write operation 1
m.MyString = "Hello World"; // Write operation 2
On the server side, we have the two write operations. I assume that the thread is from the ThreadPool. However, since the class is MarshalByRef, both opeations are separate remote procedure calls. Are they going to run on separate thread? If yes, can it occur that operation 2 is going to be executed before operation 1 finishes?
PS: Making MyRemotedClass MarshalByRef is BAD decision. But I am not allowed to change that, so please do not propose that.