参考博客:
https://segmentfault.com/a/1190000008123688 (以图的方式解释了lock锁、rlock锁、semaphore信号量)
http://blog.sina.com.cn/s/blog_82fefc100102xg97.html (以semaphore信号量实现了生产者消费者)
https://blog.csdn.net/qq_33371343/article/details/79201161 (解释了semaphore信号量中信号量的功能)
https://www.jianshu.com/p/e52154188acc (以实际semaphore的代码展示了如何允许指定数量的线程同时运行)
http://www.manongjc.com/detail/15-tdstifzseqcxlaw.html (介绍了semaphore信号量和BoundedSemaphore有界信号量的区别)
初始印象:
简单点说,Semphore,是一种带计数的线程同步机制