|
| Synchronization lock across AppDomains |
 |
Mon, 24 Mar 2008 18:31:56 +000 |
I have a multi threading scenario where i need to synchronize calls over a
routine. For that purpose i use a static generic list (synchronized). The code
need to be synchronized reside in a separate assembly. I access it from win
service context (thread pool) and web server context. In each context
synchronization works fine, but this is not true across both contexts. I did a
research and i find out that static state is not shared across AppDomains.
So my QUESTION is: How can i share state for locking purposes across the
AppDomains most effectively and can you point me to some reference code?
Thank you in advance.
|
| Post Reply
|
| Re: Synchronization lock across AppDomains |
 |
Tue, 25 Mar 2008 16:21:33 +000 |
Use a named mutux - it can be used across process, too.
http://msdn2.microsoft.com/en-us/library/system.threading.mutex.aspx
|
| Post Reply
|
|
|
|
|
|
|
|
|
|