Sometimes One Thread Is Not Enough

Java makes it easy to do more than one thing at once with the Thread class. In many traditional programming environments, you have to do tricks with asynchronous I/O or with message queues to prevent an application from apparently freezing while waiting for an operation to complete. With Java, you can create a thread to perform a task involving lengthy computations or synchronous I/O. The user interface thread continues to update the user interface elements so that screens can be repainted and the application appears responsive to the user. There may be a list or table that is continuously updated as the results of a search become available.

The Java LDAP classes are all thread safe. You can launch several threads ...

Get LDAP Programming with Java™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.