#include #include #include class SpecificWork
{private: int p_;public: SpecificWork(int value) : p_(value) { } void
operator()() { printf("Value is %....
分类:
其他好文 时间:
2014-05-27 03:06:45
阅读次数:
251
原帖地址:http://bbs.chinaunix.net/thread-1952349-1-1.html
,感谢原作者无私的分享精神。1.*关于退出:*:wq! ----强制保存退出:wq---- 保存退出:x ----- 作用和:wq 一样ZZ----
作用和:wq一样,(注意Z是大写的,并且不...
分类:
其他好文 时间:
2014-05-27 02:00:35
阅读次数:
263
Launching threadsA new thread is launched by
passing an object of a callable type that can be invoked with no parameter to
the constructor. The object...
分类:
其他好文 时间:
2014-05-19 19:23:42
阅读次数:
553
两种方式:一种继承Thread类实现;一种通过实现Callable接口。第一种方法:因为实现Thread类的run方法自身是没有返回值的,所以不能直接获得线程的执行结果,但是可以通过在run方法里把最后的结果传递给实例变量,然后通过getXX方法获取该实例变量的值。继承实现的代码:class
Run...
分类:
编程语言 时间:
2014-05-19 16:34:44
阅读次数:
287
POSIX,线程,thread,joinable,detached
分类:
编程语言 时间:
2014-05-19 13:46:33
阅读次数:
497
在MySQL的master-slave或dual master的架构中,我们经常使用show
slave status命令来查看复制状态。这里涉及几个重要的日志文件和位置:Master_Log_File,Read_Master_Log_Pos:
记录了IO thread读到的当前master bin...
分类:
其他好文 时间:
2014-05-19 12:57:28
阅读次数:
282
1. 2种实现方法: thread类和runnable接口extends
Theadpackage demo1;class Runner extends Thread { @Override public void run() {
for (int i=0;i list1 ...
分类:
编程语言 时间:
2014-05-17 18:51:36
阅读次数:
417
public class abc extends Thread{ private Object
prev=null; private Object self=null; private String msg=null; public abc(Object
prev,Object self,Strin...
分类:
编程语言 时间:
2014-05-17 18:39:01
阅读次数:
361