x

Our Privacy Policy has changed. By using this site, you agree to the Privacy Policy.

Java Thread Programming

ISBN-10: 0672315858
ISBN-13: 9780672315855
Edition: 1999
Authors: Paul Hyde
List price: $39.99 Buy it from $2.69
30 day, 100% satisfaction guarantee

If an item you ordered from TextbookRush does not meet your expectations due to an error on our part, simply fill out a return request and then return it by mail within 30 days of ordering it for a full refund of item cost.

Learn more about our returns policy

Description: Threads are part of a programme that allows the operating system to perform tasks simultaneously, thus making applications faster and more efficient. This book offers a guide to threads, which are notoriously difficult to programme.

New Starting from $30.04
what's this?
Rush Rewards U
Members Receive:
coins
coins
You have reached 400 XP and carrot coins. That is the daily max!

Study Briefs

Limited time offer: Get the first one free! (?)

All the information you need in one place! Each Study Brief is a summary of one specific subject; facts, figures, and explanations to help you learn faster.

Add to cart
Study Briefs
Calculus 1 Online content $4.95 $1.99
Add to cart
Study Briefs
SQL Online content $4.95 $1.99
Add to cart
Study Briefs
MS Excel® 2010 Online content $4.95 $1.99
Add to cart
Study Briefs
MS Word® 2010 Online content $4.95 $1.99

Customers also bought

Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

Book details

List price: $39.99
Copyright year: 1999
Publisher: Pearson Education
Publication date: 8/20/1999
Binding: Paperback
Pages: 528
Size: 7.50" wide x 9.25" long x 1.25" tall
Weight: 1.936

Threads are part of a programme that allows the operating system to perform tasks simultaneously, thus making applications faster and more efficient. This book offers a guide to threads, which are notoriously difficult to programme.

Introduction
Threads
Introduction to Threads
What Is a Thread?
Why Use Multiple Threads?
When Multiple Threads Might Not Be Good
Java's Built-in Thread Support
Basy to Start, Tough to Master
A Simple Two-Thread Example
Extending the java.lang.Thread Class
Overriding the run() Method
Spawning a New Thread
Putting It All Together
Summary
Crealing and Starting a Thread
Using Thread.currentThread()
Naming a Thread: getName() and setName()
Thread Constructors
Enlivening a Thread: start() and isAlive()
Using Thread.sleep()
Summary
Implementing Runnable Versus Extending Thread
Visual Timer Graphical Component
Extending Thread and JComponent?
Interface java.lang.Runnable
Passing a Runnable Object to a Thread's Constructor
Modifying SecondCounter to Use Runnable
Checking the Accuracy of SecondCounter
Improving the Accuracy of SecondCounter
Summary
Gracefully Stopping Threads
Interrupting a Thread: interrupt()
Suspending and Resuming Thread Execution
Stopping a Thread
The Best Replacement for stop(), suspend(), and resume()
Daemon Threads
Summary
Thread Prioritization
System Thread Priorities
Thread Priority Constants
Determining the Current Priority: getPriority()
Changing the Priority of a Thread: setPriority()
Thread States
Priorities and Scheduling
Voluntarily Relinquishing the Processor: Thread.yield()
Thread-Scheduling Scenarios
Summary
Concurrent Access to Objects and Variables
Volatile Member Variable Modifier
Synchronized Method Modifier
Synchronized Statement Block
Static synchronized Methods
Using the Class-Level Lock in a synchronized Statement
Synchronization and the Collections API
Deadlocks
Speeding Concurrent Access
Summary
Inter-thread Communication
The Need for Inter-thread Signaling
The Wait/Notify Mechanism
Object API Used for Wait/Notify
When to Use notify All() Instead of notify()
Missed Notification
Early Notification
CubbyHole Example
Using join() to Wait for a Thread to Die
Streaming Data Between Threads Using Pipes
Using ThreadLocal and Inheritable ThreadLocal
Summary
Threads and Swing
Why Isn't the Swing Toolkit Multithread-Safe?
Using Swing Utilities.invokeAndWait()
Using Swing Utilities.invokeLater()
Using SwingUtilities.isEventDispatch Thread()
When invokeAndWait() and invokeLater() Are Not Needed
The Need for Worker Threads in a GUI Setting
Using a Worker Thread to Relieve the Event Thread
Scrolling Text in a Custom Component
Animating a Set of Images
Displaying Elapsed Time on a JLabel
Floating Components Around Inside a Container
Summary
Thread Groups
What Are Thread Groups?
Using getParent()
Finding the Subgroups of a Thread Group
Using the getThreadGroup() Method of Thread
Finding All the Threads in a Thread Group
Understanding Thread Group Security
Using setMaxPriority() and getMaxPriority()
Using interrupt()
Deprecated Methods: stop(), suspend(), and resume()
Class ThreadViewer
Summary
Techniques
Self-Running Objects
Simple Self-Running Class
Using an Inner Class to Hide run()
Additional Functionality to Consider
Summary
Exception Callback
ExceptionListener Interface
Additional Methods to Support ExceptionListener
Summary
Thread Pooling
Benefits of Thread Pooling
Considerations and Costs of Thread Pooling
A Generic Thread Pool: ThreadPool
A Specialized Worker Thread Pool: HttpServer
Summary
Waiting for the Full Timeout
Accidentally Returning Early
Determining If wait() Should Be Invoked Again
A General-Purpose Wait-Until Pattern
Summary
Breaking Out of a Blocked I/O State
The read() Method Ignores Interrupts and Stop Requests
Closing a Stream to Break Out of the Blocked State
Throwing InterruptedIOException When Interrupted
Using BufferedThreadedInputStream for Interruptible I/O
Summary
The SureStop Utility
Guidelines for Using SureStop
The SureStop Class
Peering Inside Using SureStop Verbose
Watching It Work with SureStopDemo
Summary
The BooleanLock Utility
Background
BooleanLock Class
Inter-Thread Signaling Using BooleanLock
Avoiding Blocking on synchronized
Noticing Brief Changes in Value Using TransitionDetector
Summary
First-In-First-Out (FIFO) Queue
How a FIFO Queue Works
Implementing a FIFO with an Array
Simple Implementation in Java: SimpleObjectFIFO
An Expanded FIFO Queue for Object References: ObjectFIFO
A FIFO Queue for Bytes: ByteFIFO
Summary
Appendixes
The Thread API
Member Variables
Constructors
Static methods
Instance Methods
Deprecated Methods
The ThreadGroup API
Constructors
Instance Methods
Deprecated Methods
Index

×
Free shipping on orders over $35*

*A minimum purchase of $35 is required. Shipping is provided via FedEx SmartPost® and FedEx Express Saver®. Average delivery time is 1 – 5 business days, but is not guaranteed in that timeframe. Also allow 1 - 2 days for processing. Free shipping is eligible only in the continental United States and excludes Hawaii, Alaska and Puerto Rico. FedEx service marks used by permission."Marketplace" orders are not eligible for free or discounted shipping.

Learn more about the TextbookRush Marketplace.

×