一. 为什么要lock,lock了什么?当我们使用线程的时候,效率最高的方式当然是异步,即各个线程同时运行,其间不相互依赖和等待。但当不同的线程都需要访问某个资源的时候,就需要同步机制了,也就是说当对同一个资源进行读写的时候,我们要使该资源在同一时刻只能被一个线程操作,以确保每个操作都是有效即时的,...
1.源码1StatusDB::Open(constOptions&options,conststd::string&dbname,2DB**dbptr){3*dbptr=NULL;45DBImpl*impl=newDBImpl(options,dbname);6impl->mutex_.Lock()...
分类:
数据库 时间:
2015-05-11 19:43:36
阅读次数:
167
We can run graphical programs on Linux/Solaris machines on campus remotely and display them on your desktop computer running Windows. We can do this by using running two applications together on your W...
分类:
其他好文 时间:
2015-05-11 17:54:32
阅读次数:
539
1 新建工程打开Qt Creator,文件->新建文件或项目;在出来的对话框里面,选择“Android 模板”->Application->Qt Widgets Application
然后点击“Choose…”
设置完“名称”和“创建路径”,如果觉得有必要可以把“设为默认的项目路径”勾上;然后下一步;在“Qt Widgets Application”中,我建议把“Desktop”和“Andro...
分类:
移动开发 时间:
2015-05-11 10:54:32
阅读次数:
216
在此之前为了试验SAS Linux,在一台centos服务器上安装了desktop界面,目前需要删除这些界面组件,可以按照以下步骤实现:1. yum grouplist查看安装的组件2. 使用yum groupremove删除掉所有包含Desktop以及 X Windows的组件3. 在/etc/i...
分类:
其他好文 时间:
2015-05-11 10:43:52
阅读次数:
133
在批评Python的讨论中,常常说起Python多线程是多么的难用。还有人对 global interpreter lock(也被亲切的称为“GIL”)指指点点,说它阻碍了Python的多线程程序同时运行。因此,如果你是从其他语言(比如C++或Java)转过来的话,Python线程模块并不会像你想象...
分类:
编程语言 时间:
2015-05-11 10:38:41
阅读次数:
178
$shell = New-Object -ComObject WScript.Shell$desktop = [System.Environment]::GetFolderPath('Desktop')$shortcut = $shell.CreateShortcut("$desktop\Smart...
分类:
其他好文 时间:
2015-05-11 10:36:13
阅读次数:
114
ubuntu的快捷方式都在/usr/share/applications/路径下有很多*.desktop(eclipse的快捷方式也可以类似设置)下面就建立我们的studiosudo gedit /usr/share/applications/Studio.desktop [Desktop Entr...
分类:
移动开发 时间:
2015-05-11 01:20:55
阅读次数:
155
source C:/users/liaolongjun/Desktop/miduo_fileinfo.sql;注意,必须是正斜杆。如果是反斜杆,那么会报错,但也会执行。mysql> LOAD DATA LOCAL INFILE "C:/users/liaolongjun/desktop/llj.tx...
分类:
数据库 时间:
2015-05-10 22:18:07
阅读次数:
154
Here's How: To capture the entire desktop, press Command-Shift-3. The screen shot will be automatically saved as a PNG file on your desktop. To copy t...
分类:
系统相关 时间:
2015-05-10 08:34:11
阅读次数:
162