From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8741 invoked by alias); 13 Oct 2006 21:03:35 -0000 Received: (qmail 8733 invoked by uid 22791); 13 Oct 2006 21:03:34 -0000 X-Spam-Check-By: sourceware.org Received: from smtpa1.aruba.it (HELO smtp2.aruba.it) (62.149.128.206) by sourceware.org (qpsmtpd/0.31) with SMTP; Fri, 13 Oct 2006 21:03:31 +0000 Received: (qmail 15324 invoked by uid 89); 13 Oct 2006 21:03:26 -0000 Received: by simscan 1.1.0 ppid: 15319, pid: 15322, t: 0.1357s scanners: clamav: 0.80/m:29/d:680 Received: from unknown (HELO ?192.168.2.2?) (catrauser/catrasoftware.it@87.5.55.200) by smtp2.aruba.it with SMTP; 13 Oct 2006 21:03:26 -0000 Message-ID: <452FFFF7.20005@catrasoftware.it> Date: Fri, 13 Oct 2006 21:03:00 -0000 From: Giuliano Catrambone User-Agent: Thunderbird 1.5.0.5 (X11/20060808) MIME-Version: 1.0 To: pthreads-win32@sources.redhat.com Subject: Windows process very slow using more than one condition variable Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: smtp2.aruba.it 1.6.2 0/1000/N X-IsSubscribed: yes Mailing-List: contact pthreads-win32-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sourceware.org X-SW-Source: 2006/txt/msg00052.txt.bz2 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 -----------------------------------------------------------------