首页 > 其他 > 详细

并发,互斥,锁。草稿

时间:2017-01-14 11:02:46      阅读:269      评论:0      收藏:0      [点我收藏+]
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 )

并发,互斥,锁。草稿

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!