首页 > 其他 > 详细

状态的所有权

时间:2014-09-20 18:11:10      阅读:270      评论:0      收藏:0      [点我收藏+]

A semaphore initialized to one, and which is used such that it only has at most one permit available, can serve as a mutual exclusion

lock. This is more commonly known as a binary semaphore, because it only has two states: one permit available, or zero permits

available. When used in this way, the binary semaphore has the property (unlike many Lock implementations), that the "lock" can be

released by a thread other than the owner (as semaphores have no notion of ownership). This can be useful in some specialized

contexts, such as deadlock recovery.

状态的所有权

原文:http://www.cnblogs.com/yuyutianxia/p/3983507.html

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