http://download.oracle.com/javase/tutorial/essential/concurrency/locksync.htmlSynchronization is built around an internal entity known as theintrinsic lockormonitor lock. (The API specification often refers to this entity simply as a "monitor.") Intrinsic locks play a role in both aspects Read More
from:http://www.java-samples.com/showtutorial.php?tutorialid=306//Q.java 代表队列,存数据package com.test.threadcooperate;//A correct implementation of a producer and consumer. public class Q { int n; volatile boolean valueSet = false; public synchronized int get() { if (!valueSet) try { wait(); // 无限等待 // Read More
该文被密码保护。 Read More
转自:http://www.ibm.com/developerworks/cn/java/j-jtp06197.html简介:Java™ 语言包含两种内在的同步机制:同步块(或方法)和 volatile 变量。这两种机制的提出都是为了实现代码线程的安全性。其中 Volatile 变量的同步性较差(但有时它更简单并且开销更低),而且其使用也更容易出错。在这期的Java 理论与实践中,Brian Goetz 将介绍几种正确使用 volatile 变量的模式,并针对其适用性限制提出一些建议。Java 语言中的 volatile 变量可以被看作是一种 “程度较轻的synchronized”;与sync Read More
from csdn:http://files.cnblogs.com/wucg/csdn%E4%B8%8B%E8%BD%BDpartitionmagic8%C2%B70.rar确实可用。硬盘分区大小重新调整。 Read More