码迷,mamicode.com
首页 > 其他好文 > 详细

并发,互斥,锁。草稿

时间:2017-01-14 11:02:49      阅读:161      评论:0      收藏:0      [点我收藏+]

标签:mutex   cal   sig   table   str   get   lib   hal   ons   

Mutex class

A mutex is a lockable object that is designed to signal when critical sections of code need exclusive access, preventing other threads with the same protection from executing concurrently and access the same memory locations.

mutex objects provide exclusive ownership and do not support recursivity (i.e., a thread shall not lock a mutex it already owns) -- see recursive_mutex for an alternative class that does.

It is guaranteed to be a standard-layout class.

Member types

member typedescription
native_handle_type Type returned by native_handle (only defined if library implementation supports it)

 

Member functions

(constructor)
Construct mutex (public member function )
lock
Lock mutex (public member function )
try_lock
Lock mutex if not locked (public member function )
unlock
Unlock mutex (public member function )
native_handle
Get native handle (public member function )

并发,互斥,锁。草稿

标签:mutex   cal   sig   table   str   get   lib   hal   ons   

原文地址:http://www.cnblogs.com/lsfv/p/6284735.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!