Results 1 to 4 of 4

Thread: Simulate the varying conditions

  1. #1
    Join Date
    Feb 2009
    Posts
    84

    Simulate the varying conditions

    Hello,

    I have a small problem for a class of variable conditions for windows, and all windows (XP/2000, Vista, before I do a little ).

    Looking at the MSDN I found that using CONDITION_VARIABLE and functions that accompany it were perfect for what I wanted. I found it a bit odd, especially that I was told they had to be simulated, it was not native to windows, but the moment I have not been too careful.

    So I then made a class in C + + for use, I compiled with VC it works, I compile with MinGW does not work ...
    This is because the variables are only available for systems after XP/2000 and therefore not available with the WinAPI provided with MinGW.

    Can it pose me a big problem: how to make a class for the variables for the windows XP/2000/Vista without using CONDITION_VARIABLE which was introduced after XP/2000?

    I think we can use events, but I think I remember that I was told that it was not very fast ...

    Your help is welcome,
    Thank you.

  2. #2
    Join Date
    Dec 2008
    Posts
    202

    Re: Simulate the varying conditions

    To me it looks like event mutex + + WaitForMultipleObjects () with a TRUE bWaitAll ...

  3. #3
    Join Date
    Feb 2009
    Posts
    84

    Re: Simulate the varying conditions

    Hmm, okay, I'm going to have to use events.

    I know little to multithreading (I try to save myself) then I have some small questions: I understand why I do not use WaitForMultipleObjects ()? WaitForSingleObject () is not enough? What would I serve the mutex?

    again thank you.

  4. #4
    Join Date
    Dec 2008
    Posts
    161

    Re: Simulate the varying conditions

    The condition variable waiting for two things are present at the time, so it requires a WaitForMultipleObjects (). These two things are:

    • The condition itself
    • The lock that has made to wait for the condition.

Similar Threads

  1. GPS Accuracy of Motorola Motoactv is varying
    By Valan in forum Portable Devices
    Replies: 7
    Last Post: 15-11-2011, 03:34 PM
  2. Simulate Java Card Applet
    By Rily in forum Software Development
    Replies: 7
    Last Post: 26-10-2010, 01:44 PM
  3. Varying download speed on Torrent
    By Wampanoag in forum Technology & Internet
    Replies: 6
    Last Post: 26-06-2010, 06:02 AM
  4. To simulate button click in C#
    By SunilKumar in forum Software Development
    Replies: 2
    Last Post: 02-02-2009, 11:56 PM
  5. Best way to summarise a varying quantity of worksheets ?
    By WindowsUser in forum Windows Software
    Replies: 2
    Last Post: 27-11-2008, 07:57 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,749,932,104.00310 seconds with 16 queries