Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
Search the Tips
Tip Bank > Java > Threading

Threading

1-20 of 62     Previous     Next
Launching an Asynchronous Operation Using BackgroundWorker
by Jayadev D
The .NET BackgroundWorker class makes it a snap to launch asynchronous operations on a separate thread.
Using the OneWay Web Service Attribute
by Srinath MS
When you call a void web service method, apply the OneWay attribute to avoid having the calling thread wait for a response.
Using Templates for Concurrent XSLT Transformations
by Leonard Anghel
Use Templates to use a Transformer object (from the TrAX API) in multiple threads running concurrently.
Multi-Threading: When printf Can Be Better than cout
by John Hendrix
printf and fprintf are much less likely to be preempted in the middle of streaming data.
Using CreateProcess Instead of _tspawnl to Spawn Programs
by Alison Lomaka
Using _tspawnl to spawn programs can have undesirable side effects. Learn how to avoid them.
A Safe Way to Stop a Java Thread
by Kevin Spiteri
The Thread.stop() method is unsafe and thus deprecated.
A C++ Mutex Operation for Intel-compatible Processors
by Andrei Borac
Interprocess synchronization has always been classified as a "slow" operation, but that is largely only because the Windows implementation requires switching to kernel mode (an expensive operation) each time you attempt to acquire a mutex.
Executing a Subprocess
by Lundholm Per
When executing a subprocess in Java, remember to read both the stdout and stderr from the process or it may be blocked.
Threads and ThreadGroups
by Navneet Gupta
Every Java thread is a member of a
Don
by Rajesh Chathapuram
PostThreadMessage is a Win32 API used to post messages to threads. Usually, the message posted is a standard windows message with the window handle set to NULL.
How to Share a Handle Between Two Threads
by Rajesh Chathapuram
Whenever a handle is passed to another thread, use the DuplicateHandle ...
Making a Thread-Safe or Synchronized Collection
by Shantanu Garg
As you know by now, the commonly used collection classes, such as java.util.ArrayList, are not synchronized. However, if there's a chance that two threads could be altering a collection ...
Accessing Class Members From the Static Member Function
by Rajesh Chathapuram
When a class has Thread entry functions, it is usually declared as static member functions of the class as in the example ...
Take Control of the Threads Created By a Program
by Shantanu Garg
Whenever a thread is created in a program, it is unknown when it will execute. This means there may be cases where the parent program has finished but the thread is still executing. One way to ...
Portable Locks
by Danny Kalev
Sometimes you need to make sure that only one instance of the same application can run at any given time. Although every platform defines different locking schemes, you can use the following ...
Threads and JDBC Connections
by DevX Pro
Is the JDBC Connection class thread safe? In other words, can a connection be shared between multiple threads without using synchronization?
Synchronized Method Overhead
by DevX Pro
I am interested in keeping my code running as fast as possible. Is there a cost associated with making my methods synchronized, and if so, how significant a cost?
Threading and SimpleDateFormat
by DevX Pro
Is SimpleDateFormat threadsafe? I am trying to track down a bug where a date formatted "yyyy-MM-dd" actually came out as 2000-06-0001. I have four threads accessing the format method of my date formatter class at approximately the same time.
Identify Atomic and Non-Atomic Operations
by C.V. Ram
In Java, the reading and writing of 32-bit or smaller quantities are guaranteed to be atomic. By atomic we mean each action takes place in one step and cannot be interrupted. Thus, when we have ...
Re-entrant Functions
by Danny Kalev
A function that can be safely called while it's already executing is said to be re-entrant. The C++ standard doesn't state whether the Standard Library's functions are re-entrant; this is an ...
1-20 of 62     Previous     Next
Sitemap