jGuru
Register Email     Password Forgot your
password?
HOME FAQS FORUMS DOWNLOADS ARTICLES PEERSCOPE LEARN

  Search   jGuru Search Help

View:
Threads FAQ Home Page

FAQ Manager is guru Brandon Rohlfs.

Learn to manage multiple tasks with threads from your Java programs. Find answers to your frequently asked questions.

What's New

What is the purpose of the CopyOnWriteArrayList and CopyOnWriteArraySet collections?
Java:API:Collections, Programming:Concepts:Threads
John Zukowski PREMIUM, Jun 30, 2006
Synchronized operations are costly and if you aren't modifying a collection much, it is best not to synchronize all collection accesses. The CopyOnWriteXXX...
What is the primary difference between pessimistic and optimistic concurrency control?
Programming:Concepts:Threads
John Zukowski PREMIUM, Mar 31, 2006
Pessimistic assumes conflicts will occur and avoids them through exclusive locks and explicit synchronization. With the optimistic approach, it is assumed...
How do I configure a default handler for exceptions that happen in all threads?
Java:Language:Exceptions, Programming:Concepts:Threads
John Zukowski PREMIUM, Jan 22, 2006
The setDefaultUncaughtExceptionHandler() method of Thread, introduced in JDK 5.0, allows you to configure this behavior by letting you attach an implementation...

How can I get the number of active Groups within a ThreadGroup?
Programming:Concepts:Threads
Brandon Rohlfs, Sep 23, 2005
ThreadGroups activeGroupCount() returns the number of active groups within the ThreadGroup instance it was called upon. Once the number of active groups...
What is a ThreadGroup?
Programming:Concepts:Threads
Brandon Rohlfs, Sep 21, 2005
A ThreadGroup is used to represent a group of Threads. A tree structure can be formed from ThreadsGroups containing other ThreadGroups. Threads can only...
What is a ThreadGroup?
Programming:Concepts:Threads
Brandon Rohlfs, Sep 21, 2005
A ThreadGroup is used to represent a group of Threads. A tree structure can be formed from ThreadsGroups containing other ThreadGroups. Threads can...
How can a Thread preempt another Thread?
Programming:Concepts:Threads
Brandon Rohlfs, Sep 20, 2005
Any Threads running within the JVM can be preempted by creating and starting a Thread which is of a higher priority. A Threads priority can be set...
What is a Thread identifer and how can I obtain it?
Programming:Concepts:Threads
Brandon Rohlfs, Sep 12, 2005
A Threads identifer is a positive unique long value which is generated when a Thread is created. Using the following method a Threads identifer can be...
Is there a way that I can get the number of threads currently executing within the JVM?
Programming:Concepts:Threads
Brandon Rohlfs, Aug 1, 2005
You can use activeCount() for this. activeCount() returns the number of active threads that are part of the current thread's thread group. static...
How can I tell the difference between wait(timeout) timing out and actually being notified?
Java:Language, Programming:Concepts:Threads
John Zukowski PREMIUM, Jul 31, 2005
You can't directly by using wait and notify, but the can use a similar construct with the Lock interface of the java.util.concurrent.locks package, with...
How can I create a thread pool?
Programming:Concepts:Threads
John Zukowski PREMIUM, Jul 31, 2005
The Executors class of the java.util.concurrent class offers newCachedThreadPool(), newCachedThreadPool(ThreadFactory threadFactory), newFixedThreadPool(int...
What purpose does the TimeUnit class have?
Java:Language, Programming:Concepts:Threads
John Zukowski PREMIUM, Jul 31, 2005
The TimeUnit class allows you to work with time quanities as both an amount and a unit of measurement. For instance, instead of always working with milliseconds...
How can i tell what state a thread is in?
Programming:Concepts:Threads
Brandon Rohlfs, Jul 14, 2005
Prior to Java 5, isAlive() was commonly used to test a threads state. If isAlive() returned false the thread was either new or terminated but there...
How can I determine if a thread is alive?
Programming:Concepts:Threads
Brandon Rohlfs, Jul 9, 2005
The thread class provides a method which can be called on an instance of a Thread to determine if it is currently executing. If isAlive() returns...
How can I create a daemon thread?
Programming:Concepts:Threads
Brandon Rohlfs, Jul 4, 2005
The Thread API allows Threads to be created which are at the mercy of their user threads. This is accomplished simply by passing true to the setDaemon()...
How do I configure a default handler for exceptions that happen in my threads?
Programming:Concepts:Threads
John Zukowski PREMIUM, Jun 30, 2005
The setUncaughtExceptionHandler() method of Thread, introduced in JDK 5.0, allows you to configure this behavior by letting you attach an implementation...
What happens if two threads perform a get of one hashmap at the same time?
Java:API:Collections, Programming:Concepts:Threads
Muruganantham Mani, Jan 21, 2003
[I know a HashMap object is not synchronized if not done explicitly, so in a case where you have to write and read data in a hashmap from different threads...
Is it possible to wake up a sleeping thread?
Programming:Concepts:Threads
G M PREMIUM, Dec 28, 2002
[I have a thread which is sleeping for a long period of time.Another object has the object of this sleeping thread. In some event , the second object...
Thread synchronization seems to work using a queue -- that the waiting threads will acquire the released lock in first-in, first-out order. Is this behavior reliable?
Programming:Concepts:Threads
Terry Laurenzo, Jan 14, 2002
Any ordering that you are observing is not mandated by the spec. It is therefore subject to change and should not be relied on (even using a multi-processor...
Is there an example of a chat server (aka Threaded Virtual Meeting Place) ?
Programming:Concepts:Threads, Java:API:Networking
Alex Chaffee PREMIUM, Dec 23, 2001
My Purple Server is an open-source chat server with applet and command-line clients. Building a Java chat server by Greg Travis IRC Bot Dreams Is...
« previous beginning next »


Ask A Question



Related Links

Threads Forum

Sun Tutorial: Doing Two or More Tasks at Once: Threads

Concurrent Programming in Java, Second Edition

Thread Method Deprecation

Wish List
Features
About jGuru
Contact Us

 




JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
ServerWatch.com Article: Virtualization Enters the SMB World
ITChannelPlanet.com Article: Emerging E-Discovery Market Grows More Vital for VARs
StoreVault Whitepaper: Introduction to Networked Storage
Oracle eBook: Implementing Business Intelligence in Your Organization
Hoovers Sales Tip: Building Credibility with New Clients
SAP Whitepaper: A Corporate Guide to Better Decisions Through IT
Microsoft Article: Flexibility, Agility the Keys to Dynamic IT
Microsoft Article: Improving Infrastructure Management for Mid-Size Companies
IBM Whitepaper: CIO Insights--Ignite Innovation by Fusing Business and IT
IBM Whitepaper: Transforming Legacy Apps into SOA
Internet.com eBook: All About Botnets
Intel Article: 8 Simple Rules for Designing Threaded Applications
Symantec Whitepaper: E-Mail Discovery--Worst-Case Scenarios Versus Best Practices
Ipswitch Whitepaper: Secure File Transfer In the Era of Regulatory Compliance
Symantec Whitepaper: A Unified, Proactive Approach to Endpoint Security
APC eBook: Putting the Green in IT
Intel Whitepaper: Best Practices for Developing and Optimizing Threaded Applications
Symantec Whitepaper: Emerging Trends in Fighting Spam
Oracle eBook: Guide to Oracle 11g and Database Migration
Symantec Whitepaper: Best Practices for IM Archiving & Compliance
Intel Article: The Challenges of Developing Multithreaded Processing Pipelines
Avaya Whitepaper: SIP--Creating Next-Generation Telecom Applications
Avaya Article: Event Processing Demands Real-Time Response for Communications-Enabled Business Apps
MessageLabs Whitepaper: Spam Spikes--A Real Risk to Your Business
Symantec Article: Guarding the Corporate Gateway
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Epicor Webcast: Requirements to Consider When Looking at ITSM Tools
Intel Video: Three Must-Knows for Parallelism
Microsoft: NXT Web Seminar Series
Microsoft Partner Program Video: The Secrets to Partner Success
Rational Asset Manager: Succeed with Asset-based Development
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
NXPowerLite: Desktop Edition Software Trial
IBM Rational Systems Development Solution e-Kit
IBM SOA Development Survival Guide eKit
Evaluate IBM Rational Build Forge Online
IBM Enterprise Architect eKit for SOA
Evaluate Rational Application Developer Online
Iron Speed Designer Application Generator
Symantec IM Detection Utility
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
IBM Overview Video: Next Generation Data Warehousing
IBM Tutorial: Intro to XML User Interface Language (XUL) Development
Microsoft How-to Article: Get Going with Silverlight and Windows Live
IBM Tutorial: The Ajax Transport Method
IBM Tutorial: Learning PHP
IBM Tutorial: Validating XML
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES