search

Home  >  Q&A  >  body text

c++ - 一个拥有Mutex的线程,如何理解这句话?

一个拥有Mutex的线程,如何理解这句话?线程可以拥有Mutex?

黄舟黄舟2807 days ago557

reply all(3)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 13:50:09

    mutex is a mechanism for implementing protected access to shared resources.
    A thread that owns a Mutex means that only the thread that owns the Mutex can run the critical section protected by the mutex at the same time until the thread releases the mutex.

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 13:50:09

    It is the active thread among all the threads protected by this Mutex.
    btw: Mutex is a mutex lock

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 13:50:09

    This should mean that this thread called mutex.lock

    reply
    0
  • Cancelreply