通常,使用有名互斥体(named mutex).但是该方案有以下的缺陷互斥体的名称有被其他应用程序使用的较小,潜在风险.此时,该方案不再有效,并且很难检测到bug.该方案无法实现允许一个应用程序产生N个实例这样的一般问题.使用Process类. 1 /// 2 //...
分类:
其他好文 时间:
2014-07-09 23:48:19
阅读次数:
241
最近刚刚接手同事的OpenResty的项目,发现对mysql,redis的操作没有用连接池,故对此进行了改造。MYSQL主要是通过mysql_pool.lua 和 dbutil.lua 来封装对数据库的操作mysql_pool.lua: 1 module("mysql_pool", package....
分类:
数据库 时间:
2014-07-07 21:44:07
阅读次数:
591
myeclipse6.0 下载地址。官方下载地址: http://www.myeclipseide.com/module-htmlpages-display-pid-4.html本地快速下载地址: http://www.rosebush.cn/blog/html/23/t-7423.html htt...
分类:
系统相关 时间:
2014-07-07 17:55:31
阅读次数:
194
今天要用yum安装软件,于是yum install ***,但是报错,错误如下:There was a problem importing one of the Python modules required to run yum. The error leading to this problem...
分类:
其他好文 时间:
2014-07-07 14:55:42
阅读次数:
350
环境:ubuntu 8.04内核版本:2.6.32.59-debug1、编写文件hello.c#include #include //printk/*写内核驱动的时候 必须加载这个头文件,作用是动态的将模块加载到内核中去,常用的宏定义如 MODULE_LICESENCE(),MODULE_AUT.....
分类:
系统相关 时间:
2014-07-01 19:30:08
阅读次数:
252
var ivar = [:]
ivar.className // __NSDictionaryI
var i = 1
i.className // error: 'Int' does not have a member named 'className'
If you want to get the type of a primitive, you have to use brid...
分类:
移动开发 时间:
2014-06-30 20:14:35
阅读次数:
311
module.exports = function(grunt){ // 项目配置 grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), uglify: { option...
分类:
其他好文 时间:
2014-06-30 15:24:10
阅读次数:
215
At present, there is a package named cvsd, which is a wrapper for cvs server running in pserver mode, so the cvs server configuration is easier than b...
分类:
其他好文 时间:
2014-06-30 12:28:42
阅读次数:
282
maven多module项目中,单元测试代码千万不能引入其他module的测试代码,否则在执行测试时就会出现NoClassDefFoundError: net/csdn/blog/chaijunkun/util/BaseTest。奇怪的是引入公共单元的src/main/java代码都能正常加载。本文详细介绍了重现问题的过程和解决办法。...
分类:
其他好文 时间:
2014-06-30 08:43:59
阅读次数:
715
Linux下Nginx的安装 如果出现:error: 'ngx_http_file_cache_node_t' has no member named 'length'异常,可能是ngx_cache_purge-2.1.tar.gz版本太旧导致...
分类:
系统相关 时间:
2014-06-30 00:11:43
阅读次数:
401