首先,先简单介绍,线程池的工作原理。1.他自身拥有一定数量的线程数组 threads,处于等待状态,等待唤醒(通过条件变量)2.拥有一个任务队列 m_tasks,存储用户的任务,有新任务以后,唤醒线程,取出任务,通过回调函数的方式调用任务,执行完以后继续等待。使用情况:线程池,适用于会话简短的情况下...
分类:
编程语言 时间:
2015-08-30 15:33:12
阅读次数:
190
I/O wait is a per-CPU performance metric showing time spent idle, when there are threads on the CPU dispatcher queue (in sleep state) that are blocked...
分类:
其他好文 时间:
2015-08-29 15:22:18
阅读次数:
141
看完了APUE第三版的Chapter11 Threads,跟着书上的demo走了一遍,并且参考了这个blog(http://www.cnblogs.com/chuyuhuashi/p/4447817.html)的非常好的example。下面的内容就是看书过程中记录的,可以作为一个参考,但决不能代替看...
分类:
编程语言 时间:
2015-08-27 22:33:10
阅读次数:
305
操作步骤: 1、双击jmeter.bat 2、右键点击测试规划à添加àThreadsà线程组,此时在测试规划下边显露出来线程组选项。点击该选项,显露出来线程组界面。参变量线程数表达若干个烦请,参变量Ramp-Up Period表达在多长时间内跑完全部的烦请,循环回数表达同一个烦请执行若干次。 ...
分类:
其他好文 时间:
2015-08-21 11:19:41
阅读次数:
128
使用Console程序,非GUI应用写了一个QLocalSocketServer,一开始运行就提示如下的问题: QSocketNotifier: Can only be used with threads started with QThread 经分析知道,QSocket类需要一个事件循环来处理客...
分类:
其他好文 时间:
2015-08-21 10:57:43
阅读次数:
245
EventBus简介本篇基于EventBus 2.4撰写。Android optimized event bus that simplifies communication between Activities, Fragments, Threads, Services, etc. Less code, better quality.上面是从官方repo拉来的代码,大致是说简化的组件之间的交流通信,...
分类:
其他好文 时间:
2015-08-21 00:15:53
阅读次数:
147
# lock across processe.g. Server handles request from different clients, there clients are essentially different processes, they could potentially wri...
分类:
其他好文 时间:
2015-08-18 21:15:05
阅读次数:
150
1.--log已经被--general-log取代,指定日志文件用--general_log_file=file_name选项2.--log-slow-queries和log_slow_queries选项使用--slow_query_log开启慢查询日志,并使用slow_query_log_file=filename指定慢查询文件3.--one-thread选项用被--thread_handling=no-threads选项..
分类:
数据库 时间:
2015-08-18 16:39:09
阅读次数:
173
错误原文分析文件操作超租期,实际上就是data stream操作过程中文件被删掉了。通常是因为Mapred多个task操作同一个文件,一个task完成后删掉文件导致。这个错误跟dfs.datanode.max.transfer.threads参数到达上限有关。这个是datanode同时处理请求的任务上限,总默认值是 4096,该参数取值范围[1 to 8192]hadoop docs hdfs-si...
分类:
编程语言 时间:
2015-08-17 14:05:57
阅读次数:
176
http://stackoverflow.com/questions/37026/java-notify-vs-notifyall-all-over-againDo you want to tell one of the waiting threads that something happened...
分类:
其他好文 时间:
2015-08-16 15:09:07
阅读次数:
132