上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 55 下一页
一。VirtualBox 的快捷键VirtualBox 默认的Host 键是Right CtrlHost 键可以点击 Oracle VM VirtualBox 管理器的左上角 “管理”->"全局设定"->"热键"重新设定。控制:Host+I 禁止自动捕获鼠标(M)Host+Del 发送 Ctrl-A... Read More
posted @ 2014-10-01 21:14 等风来。。 Views(579) Comments(0) Diggs(0) Edit
一、 演示 There are three general strategies for queuing: 排队有三种通用策略: 直接提交。工作队列的默认选项是 SynchronousQueue,它将任务直接提交给线程而不保持它们。在此,如果不存在可用于立即运行任务的线程,则试图把任务加入队列将失败 Read More
posted @ 2014-09-29 01:30 等风来。。 Views(848) Comments(0) Diggs(0) Edit
一、结构 Lock的实现类其实都是构建在AbstractQueuedSynchronizer上,每个Lock实现类都持有自己内部类Sync的实例 二、LockSupport Basic thread blocking primitives for creating locks and other s Read More
posted @ 2014-09-27 15:44 等风来。。 Views(326) Comments(0) Diggs(0) Edit
Servlet Threading ModelThe scalability issues of Java servlets are caused mainly by the server threading model:Thread per connectionThe traditional IO... Read More
posted @ 2014-09-26 00:34 等风来。。 Views(288) Comments(0) Diggs(0) Edit
一。thread-per-connectionThe thread-per-connection approach uses an exclusive worker thread foreach connection. Within the handling loop, a worker threa... Read More
posted @ 2014-09-25 20:58 等风来。。 Views(270) Comments(0) Diggs(0) Edit
The terms asynchronous and non-blocking are closely related and are often used interchangeably, but they are not quite the same thing. Blocking A func Read More
posted @ 2014-09-25 01:10 等风来。。 Views(312) Comments(0) Diggs(0) Edit
一。锁的劣势 (1) 在JDK1.5之前都是使用synchronized关键字保证同步的,这种通过使用一致的锁定协议来协调对共享状态的访问,可以确保无论哪个线程持有守 护变量的锁,都采用独占的方式来访问这些变量 (2)如果出现多个线程同时访问锁,则一些线程将被挂起,当线程恢复执行时,必须等待其它线程 Read More
posted @ 2014-09-25 00:40 等风来。。 Views(3364) Comments(0) Diggs(0) Edit
一。传统数据传输1.user mode &kernel mode2.context switchThe steps involved are:1.The read() call causes a context switch (see Figure 2) from user mode to kern... Read More
posted @ 2014-09-23 23:12 等风来。。 Views(333) Comments(0) Diggs(0) Edit
实现FutureTask的要点 1.需要实现一个链表(每个节点包含当前线程的引用) 2.通过LockSupport.park 对线程进行阻塞 3.节点的唤醒(task完成, 线程Interrupt, 或await超时), FutureTask.run 方法 public void run() { / Read More
posted @ 2014-09-22 00:12 等风来。。 Views(508) Comments(0) Diggs(0) Edit
一、ThreadLocal的原理以及存在的问题 a. 每个线程内部维护了一个ThreadLocal.ThreadLocalMap类型的变量 b. ThreadLocalMap 的 key 为 ThreadLocal,value为对应的变量 c. 对ThreadLocal进行get/set操作时,会先 Read More
posted @ 2014-09-21 23:42 等风来。。 Views(814) Comments(0) Diggs(0) Edit
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 55 下一页
------------------------------------------------------------------------------------------------------------ --------------- 欢迎联系 x.guan.ling@gmail.com--------------- ------------------------------------------------------------------------------------------------------------