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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access