码迷,mamicode.com
首页 >  
搜索关键字:old lock file    ( 66212个结果
《python源码剖析》笔记 python多线程机制
1.GIL与线程调度 Python中的线程是操作系统的原生线程,Python虚拟机使用一个全局解释器锁(Global Interpreter Lock)来互斥线程对Python虚拟机的使用 为了支持多线程机制,一个基本的要求就是需要实现不同线程对共享资源访问的互斥,所以引入了GIL。 GIL:在一个线程拥有了解释器的访问权之后,其他的所有线程都必须等待它释放解释器的访问权,即使这些线程的下一条指令并不会互相影响。 在调用任何Python C API之前,要先获得GIL GIL缺点:多处理器退化为单处理器;优...
分类:编程语言   时间:2014-06-25 19:48:52    阅读次数:358
C++11中的mutex, lock,condition variable实现分析
本文分析的是llvm libc++的实现:http://libcxx.llvm.org/ C++11中的各种mutex, lock对象,实际上都是对posix的mutex,condition的封装。不过里面也有很多细节值得学习。 std::mutex 先来看下std::mutex: 包增了一个pthread_mutex_t __m_,很简单,每个函数该干嘛就干嘛。 class mutex...
分类:编程语言   时间:2014-06-25 19:22:54    阅读次数:338
DirectoryIterator
目录迭代器$dir = new DirectoryIterator(dirname(__FILE__));foreach ($dir as $fileinfo) { if (!$fileinfo->isDot()) { echo $fileinfo->getFilename...
分类:其他好文   时间:2014-06-25 00:26:31    阅读次数:231
SyntaxError: Non-ASCII character '\xe5' in file a.py on line 9, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
SyntaxError: Non-ASCII character '\xe5' in file a.py on line 9, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details在文件头...
分类:编程语言   时间:2014-06-24 22:13:37    阅读次数:443
Arm-linux-gcc-4.3.2安装步骤
下载地址: http://www.friendlyarm.net/dl.php?file=arm-linux-gcc-4.3.2.tgz 安装交叉编译工具链: 1、首先以root用户登入 2、复制arm-linux-gcc-4.3.2.tgz到根目录下tmp文件夹里 3、解压命令tar xvzf arm-linux-gcc-4.3.2 -C / 注意以上命令...
分类:系统相关   时间:2014-06-24 20:56:37    阅读次数:377
【MySQL案例】mysql-libs-5.1.73-3.el6_5.x86_64 conflicts with file from package Percona-Server-server
如果遇到mysql-libs-5.1.73-3.el6_5.x86_64conflicts with file from package Percona-Server-server报错,有两种情况导致这个问题: 1)卸载操作系统预装的mysql-libs包 rpm -qa | grep -i libs | grep -i mysql rpm -e mysql-libs 2)安装Percona-Server-shared-compat-5.5.33-rel31.1.566.rhel6.x86_64.rpm包(...
分类:数据库   时间:2014-06-24 18:23:49    阅读次数:247
C语言中宏的使用(#,##,do…while(0)宏)
C语言中宏的使用(#,##,do…while(0)宏) 1.预定义宏的使用__FILE__,__FUNCTION__,__LINE__。 #include void fun(void) { char v1; short v2; int v3; long v4; printf("v1: %x\n",&v1); printf("v2: %x\n",&v2); print...
分类:编程语言   时间:2014-06-24 15:29:13    阅读次数:214
Teamcenter10 step-by-step installation in Linux env-Oracle Instance Creation
Configure Oracle environment It is recommended that user sets the specific environment for Oracle installation in ~/.bash_profile file prior to instan...
分类:数据库   时间:2014-06-24 15:26:00    阅读次数:611
python拼接字符串
可以用+, 跟C#一样,效率有问题,用join,join的用法如下:print '张三丰'.join('lisi') 打印出的会是:l张三丰i张三丰s张三丰i那么要拼接怎么搞呢?for d in os.listdir('d:\\'): print ':::'.join([d,'file' i...
分类:编程语言   时间:2014-06-24 15:07:16    阅读次数:230
linux中与Oracle有关的内核参数详解
工作当中遇到oracle运行时CPU占用率达到90%以上,调小以下参数值后恢复正常。fs.file-max = 65536 net.core.rmem_default=262144net.core.rmem_max=262144net.core.wmem_default=262144net.core...
分类:数据库   时间:2014-06-24 14:50:14    阅读次数:228
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!