Thread: yes/no quastion about mutex

  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    29

    yes/no quastion about mutex

    i have pretty simpel but importent quastion for my program

    if i have many threads going trough one critical section of kode stopped by a mutex

    when one thread is finish ready the critical section, and lets say 10 other threads are waiting to enter, will the threads enter the critical section in the same order they startet to wait? or will the thread enter the critical section randomly

    thanks

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    It's called RTFM
    "There is no guarantee about the order in which waiting threads will acquire ownership of the critical section."

  3. #3
    Registered User
    Join Date
    Jan 2006
    Posts
    29
    oh ok - is there a command or way to create this queue ?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Mutex and Shared Memory Segment Questions.
    By MadDog in forum Linux Programming
    Replies: 14
    Last Post: 06-20-2010, 04:04 AM
  2. mutex problem
    By radeberger in forum C++ Programming
    Replies: 16
    Last Post: 03-20-2009, 04:24 PM
  3. Yet another n00b in pthreads ...
    By dimis in forum C++ Programming
    Replies: 14
    Last Post: 04-07-2008, 12:43 AM
  4. Thread Synchronization in Win32
    By passionate_guy in forum C Programming
    Replies: 0
    Last Post: 02-06-2006, 05:34 AM
  5. Mutex - location of lock/unlock
    By cjschw in forum C++ Programming
    Replies: 1
    Last Post: 08-14-2003, 12:28 PM