About 133,000 results
Open links in new tab
  1. std::mutex - cppreference.com

    Mar 6, 2024 · The mutex class is a synchronization primitive that can be used to protect shared data from being simultaneously accessed by multiple threads. mutex offers exclusive, non …

  2. multithreading - What is a mutex? - Stack Overflow

    Aug 29, 2008 · A mutex is a programming concept that is frequently used to solve multi-threading problems. My question to the community: What is a mutex and how do you use it?

  3. Standard library header <mutex> (C++11) - cppreference.com

    Jul 3, 2024 · recursive_timed_mutex (C++11) provides mutual exclusion facility which can be locked recursively by the same thread and implements locking with a timeout (class) [edit] …

  4. Can someone Explain Mutex and how it is used? - Stack Overflow

    Aug 20, 2010 · A mutex provides mut ually ex clusive access to a resource; in your case, a database. There aren't multiple threads in your program, but you can have multiple instances …

  5. c++ - How do mutexes really work? - Stack Overflow

    Aug 2, 2012 · However, how is this implemented? To lock itself, the mutex has to set a bit somewhere that says that it is locked. But what if the second mutex is reading at the same …

  6. std::mutex::mutex - cppreference.com

    Oct 22, 2023 · 1) Constructs the mutex. The mutex is in unlocked state after the constructor completes.

  7. std::recursive_mutex - cppreference.com

    Oct 23, 2023 · The recursive_mutex class is a synchronization primitive that can be used to protect shared data from being simultaneously accessed by multiple threads. recursive_mutex …

  8. c++ - Mutex example / tutorial? - Stack Overflow

    The function pthread_mutex_lock() either acquires the mutex for the calling thread or blocks the thread until the mutex can be acquired. The related pthread_mutex_unlock() releases the mutex.

  9. What is the difference between lock, mutex and semaphore?

    Feb 25, 2010 · I've heard these words related to concurrent programming, but what's the difference between lock, mutex and semaphore?

  10. language agnostic - How are mutexes implemented? - Stack …

    Sep 28, 2009 · A mutex is the starting point for a critical section, which uses a mutex internally to see if it can enter a section of code. If the mutex is free, it sets the mutex and executes the …