Windows Vista Beta | WinVistaBeta.com - Message | WCF multithreaded service syncronization problem

September 07, 2008  
Subject: WCF multithreaded service syncronization problem
Group: microsoft.public.windows.developer.winfx.indigo
Date: 1/29/2008 10:21:57 AM
From: Ireland [Email Address Protection]


I have a console application that generates a thread that serves as a
WCF services. I also have other threads in the application. I
syncronize the incoming data to the WCF service via a Queue class the
uses "EventWaitHandle"s. For some reason the WCF thread is not
correctly doing a "Set" on the EventWaitHandle. Running the Queue class
by itself (no WCF) works fine and has worked successfully in many
different multi-threaded environments. The queue class is tread safe
implementation of a multiple reader - multiple writer queue. The
problem seems to be associated with not have the correct context for
EventWaitHandle when being Set on the WCF thread. In the intended
environment there may be several identical applications running each
with a unique binding but servicing multiple clients. I have played
around with
[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.....)] but it does
not seem to help. Any clues as to a direction to follow?


--
Ireland

Back