Make MarshalByRefObject thread-safe
.NET (Core and Framework)
1
Posts
1
Posters
0
Views
1
Watching
-
I am hosting in a windows service a remoting object as singleton, I want to make sure that clients calls are thread-safe. Here is the class definition:
[Synchronization(true)] public class Service : MarshalByRefObject, IService
My question to you is if the Synchronization attribute is a good thing or should I use locks inside every Method of the Service class.