Useful practices for Java Threads


News: Useful practices for Java Threads

  1. Useful practices for Java Threads (2 messages)

    Every now and then I end up looking at ways to improve our use and handling of the various threads that are used internally. With this in mind I decided that I would write an article covering useful practices for java threads that should become second nature to all who have to deal with threads on a regular basis.

    Daemon threads

    Daemon threads can be thought of as background threads. They sit in the background working away at a task whilst the program is still running. When I refer the the program I mean there is a non-daemon thread currently running as when all non-daemon threads are running the program will close. Should this happen then all daemon threads will be halted, anything being executed will “drop out� this means that finally bloack will not even be executed so it is important to ensure that daemon thread do not contain anything that will cause harm if the execution is just ended without warning.

    Read the rest of the article on the Java PDF Blog.

    Threaded Messages (2)

  2. Very basic[ Go to top ]

    I don't think there's a concurrency tutorial that has't included these for the last 10-15 years.

  3. Java PDF Blog[ Go to top ]

    What does this have to do with PDF (Portable Document Format) ? Don't get the link