- 浏览: 84865 次
最新评论
-
bailangfei3344:
自我介绍 -
regionwar:
你好,转化为人为:1、不该加锁的不要加锁:局部变量,单线程占用 ...
关于java锁机制的优化 -
danni505:
希望能交流:
msn:danni-505#hotmail.co ...
关于java锁机制的优化 -
ouspec:
收藏的东西不错。
TOP500 -
willpower:
The idea behind is e-sync IO do ...
Rethink the sync
文章列表
java 代码
import java.util.Vector;
/**
* Thread pool
*/
public class ThreadPool implements Runnable {
// Default ThreadPool minimum size
public final static int DEFAULT_MIN_SIZE = 0;
// Default ThreadPool maximum si ...
- 2007-03-07 11:53
- 浏览 1053
- 评论(0)
java 代码
public class MultiSemaphore
{
protected int value;
public MultiSemaphore(int v) {
value = v;
}
//The P method here takes an integer parameter of how many ...
- 2007-03-07 11:50
- 浏览 1010
- 评论(1)
和作者联系:djb_skyface@tom.com
接触多线程已经不少时间了,也做了不少事情,但是一直觉得用起来不那么顺手,在debug的时候,往往会比较担心在同步上出什么问题,想起"程序员最怕的是自己写的代码"这句话,觉得真是不假.
终于有一天,我觉得是时候把这个问题弄清楚了,所以,我就在网上找相关的内容看,结果竟然是找不到在我这个阶段应该看的,不是太简单,就是一笔带过,不知所云.
废了九牛二虎之力,终于差不多弄清楚了,其中有不少误区,以前认为的和真理相差甚大.想起自己花费的时间,真是觉得有点多,所以把它写出来,一是防止自己以后又会忘掉,二 ...
- 2007-03-07 11:44
- 浏览 2204
- 评论(0)
1>man(help), passwd(change password), su - root(switch user), who(who is logged in), date(date and time), echo(disply message)
echo $PATH
/usr/bin:/usr/local/bin
echo My name is $USER - Home directory=$HOME.
My name is hermie - Home directory=/home/hermie.
The echo command is very similar to the ...
- 2007-03-06 15:58
- 浏览 838
- 评论(0)
1> linux file types:
ordinary, directory, block(harddisk...device), character(crt,...)
2> file name:
256 characters
3> directories:
/bin Contains the Linux system commands and programs (also called binaries). Pronounced "slash bin."
/dev Contains special device files that correspon ...
- 2007-03-06 14:25
- 浏览 808
- 评论(0)
This is the first time:
java 代码
System.out.println("Q: 陈英俊先生, 你对三配小姐有什么看法?");
System.out.println("A: 什么啊? 国里有三配啊? 我握是不晓得罗");
System.out.println("News: 陈英俊一下飞机就开始寻找三配小姐");
The second time:
java 代码
System.out.println("Q: 陈英俊先生, 你对三配小 ...
- 2007-03-06 11:23
- 浏览 784
- 评论(0)
java 代码
System.out.println("What's ur name?");
System.out.println("My name is willpower");
将这段代码献给所有路过的朋友...
Cheers.
- 2007-03-05 15:23
- 浏览 807
- 评论(1)