![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e100. Using a Thread-Local Variablestatic ThreadLocal tlData = new ThreadLocal(); public void aMethod() { // Retrieve value. Object o = tlData.get(); // Set value. tlData.set(o); }
e93. Stopping a Thread e94. Determining When a Thread Has Finished e95. Pausing the Current Thread e96. Pausing a Thread e97. Determining If the Current Thread Is Holding a Synchronized Lock e98. Allowing an Application with Live Threads to Exit e99. Listing All Running Threads e101. Getting the Stack Trace of an Exception e102. Implementing a Work Queue
© 2002 Addison-Wesley. |