// threads/mutex1.c 11-5
#include #include #include struct foo { int f_count; pthread_mutex_t f_lock; int f_id; /* ... more stuff her...
分类:
编程语言 时间:
2015-02-07 18:42:17
阅读次数:
227
常用设置 ~/.emacs 1 ;; 一打开就起用 text 模式。 2 (setq default-major-mode 'text-mode) 3 4 ;; 语法高亮 5 (global-font-lock-mode t) 6 7 ;; 以 y/n代表 yes/no 8 (fset 'ye...
分类:
系统相关 时间:
2015-02-07 06:52:03
阅读次数:
190
解决方法: 打开 Wins+R=> mstsc /v: yourVMIPadress /adminmstsc /v:xx.xx.xx.xx:54738 /admin
分类:
其他好文 时间:
2015-02-06 14:40:28
阅读次数:
119
首先,打开终端cd到目录/cocos2d-x-3.2/tools/cocos2d-console/bin下,运行cocos.py脚本创建文件。
[javascript] view
plaincopy
./cocos.py new HelloWorldDemo -p com.coco2dx.org -l cpp -d ~/Desktop...
分类:
其他好文 时间:
2015-02-06 11:22:22
阅读次数:
152
通过修饰键来查看像command、option、control、shift这些按键在Mac下叫做修饰键,一般情况下他们大都用来辅助输入或者用作快捷键的修饰键。打开“系统偏好设置”,点击“键盘→键盘→修饰键”即可看到这些修饰键,如caps lock 是?,control是?,option是?,comm...
分类:
系统相关 时间:
2015-02-06 10:58:36
阅读次数:
200
CREATE procedure sp_who_lock as begin declare @spid int declare @blk int declare @count int declare @index int dec...
分类:
其他好文 时间:
2015-02-06 10:55:50
阅读次数:
123
Monitor类与Lock语句相比,Monitor类的主要优点是:可以添加一个等待被锁定的超时值。usingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Threading.Tasks;
usingSystem.Threading;
namespaceConsoleApplication2
{
classProgram..
分类:
编程语言 时间:
2015-02-06 07:07:57
阅读次数:
193
读写锁的概念很简单,允许多个线程同时获取读锁,但同一时间只允许一个线程获得写锁,因此也称作共享-独占锁。在C#中,推荐使用ReaderWriterLockSlim类来完成读写锁的功能。某些场合下,对一个对象的读取次数远远大于修改次数,如果只是简单的用lock方式加锁,则会影响读取的效率。而如果采用读...
第四部分
自从换了路由器之后,丢包少了,画面稳了,心情也好了。
今天上午ubuntu搜狗输入法突然不好使了,不能输入汉字了,真别扭阿。赶紧百度怎么办,搜到一条命令,删除IBus,具体什么命令我就不说了,坑阿!删除了以后整个系统设置都快全消失了。有人说这是ubuntu的BUG,谁知道呢,最后重装desk-top才行了。
sudo apt-get instal ubuntu-desktop所以阿...
分类:
其他好文 时间:
2015-02-05 16:27:46
阅读次数:
237
原文:http://tech.meituan.com/innodb-lock.html前言:我们都知道事务的几种性质,数据库为了维护这些性质,尤其是一致性和隔离性,一般使用加锁这种方式。同时数据库又是个高并发的应用,同一时间会有大量的并发访问,如果加锁过度,会极大的降低并发处理能力。所以对于加锁的处...
分类:
数据库 时间:
2015-02-04 23:07:12
阅读次数:
297