This is the mail archive of the
pthreads-win32@sourceware.org
mailing list for the pthreas-win32 project.
Windows process very slow using more than one condition variable
- From: Giuliano Catrambone <giuliano dot catrambone at catrasoftware dot it>
- To: pthreads-win32 at sources dot redhat dot com
- Date: Fri, 13 Oct 2006 23:07:03 +0200
- Subject: Windows process very slow using more than one condition variable
Hello guys
I have a program which is portable on windows and Linux and I'm
using pthread-win32
for the Windows version.
In my scenario I have one events queue and many threads acceding to
this queue
to get events (consumers) and to add events (producers).
Every event has, as property, the consumer thread type addressee
which has to get the event.
In my implementation I use as many condition variables as the number
of different cunsumer types.
In this way, every time an event for the consumer X is added into
the queue, a pthread_cond_signal
is called on the condition variable where only the consumer X is in
timedwait.
If I have only one consumer type, and then one condition variable,
the process on Windows is very fast
and works fine.
If I have more than one consumer types, and then more than one
condition variables, the process on Windows
is very slow.
BTW, the same code, on linux, works fine also with many consumer
types threads and then many condition variables.
Do you have some ideas why Windows seems works very slow using more
than one condition variables?
Thanks
giu
--
-----------------------------------------------------------------
Giuliano Catrambone
Director, Professional Services
Open source projects:
http://sourceforge.net/projects/catralibraries/
http://sourceforge.net/projects/openstreaming/
CatraSoftware:
Home page: http://www.catrasoftware.it
Streaming page:
http://www.catrasoftware.it/Streaming/CatraStreamingPlatform.htm
Mobile +39.393.8816655
Fixed: +39.02.90377228
Skype: Catrambone Giuliano
msn: giulianocatrambone@hotmail.com
Jabber: giuliano.catrambone@Jabber.org
Yahoo: giuliano.catrambone
-----------------------------------------------------------------