Home » Tutorials » Java Programming » Threads
Threads
562
Category : Tutorials » Java Programming
http://java.sun.com/docs/books/tutorial/essential/thread. s/index.html . The garbage collector of Java runs on a separate (daemon) thread .
Download File Free PDF eBooks Download Tutorials Java Programming
Multiple Threads in an Application • Each thread has its own run-time stack and CPU state (i.e., register content, next instruction, etc. ) • If two threads execute the same method, each will have its own copy of the local variables the methods uses - Why? • However, all threads see the same dynamic memory, i.e., heap - which variables are stored on the heap? • Two different threads can act on the same object and same static fields concurrently 8
Why Threads? • Improve the responsiveness of applications - i.e., users wait less time (compared to a single thread or MP) • Improve utilization of resources - e.g., one thread can run while the other waits for I/O • Provide a convenient programming technique - run resource cleaners in the background - graphical applications
Favorite Java Programming PDF File
2857
AspectJ2EE AOP J2EE
category Tutorials » Java Programming
3483
J2EE EJB Overview
category Tutorials » Java Programming
1213
Unraveling The Mysteries of J2EE Web Applicatuib Communications
category Tutorials » Java Programming
3729
Experience J2EE Using WebSphere Application Server V6 1
category Tutorials » Java Programming
3591

