public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
* Windows process very slow using more than one condition variable
@ 2006-10-13 21:03 Giuliano Catrambone
  2006-10-16 13:16 ` Giuliano Catrambone
  0 siblings, 1 reply; 2+ messages in thread
From: Giuliano Catrambone @ 2006-10-13 21:03 UTC (permalink / raw)
  To: pthreads-win32

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
-----------------------------------------------------------------


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Windows process very slow using more than one condition variable
  2006-10-13 21:03 Windows process very slow using more than one condition variable Giuliano Catrambone
@ 2006-10-16 13:16 ` Giuliano Catrambone
  0 siblings, 0 replies; 2+ messages in thread
From: Giuliano Catrambone @ 2006-10-16 13:16 UTC (permalink / raw)
  To: pthreads-win32

Hi all,
    I investigated more the problem and it looks that the 
pthread_cond_timedwait never respect
    the timeout I gave as input. I observed that also the Sleep Windows 
API never respect
    his arguments in millisecs.

    Do you know which could be the problem?
    Thanks
       giu

Giuliano Catrambone wrote:
> 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
-----------------------------------------------------------------


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-10-16 13:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-13 21:03 Windows process very slow using more than one condition variable Giuliano Catrambone
2006-10-16 13:16 ` Giuliano Catrambone

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).