Tampilkan postingan dengan label states. Tampilkan semua postingan
Tampilkan postingan dengan label states. Tampilkan semua postingan

Non Runnable States in Multithreading - Different states while thread is in runnable states

Posted by Unknown Senin, 03 Juni 2013 0 komentar
See more basics of thread in java here :
What is thread in java ?
The different states while thread is in runnable states are given below :
Sleeping States :
  •  may be alive, but not running
  •  may return to runnable state
  •  stop running for an amount of time 
Waiting for Notifications :
  •  wait for notification from other 
  •  send to runnable after notified thread
Blocked on I/O :
  • after availability of resource sends to runnable
Blocked for Joint Completion :
  • waiting for completion of another thread
Blocked for Lock Acquistion :
  • Come to this state because of  waiting to acquire the lock of an object.

Baca Selengkapnya ....

What is a thread in java ?

Posted by Unknown 0 komentar
see more post :
Non Runnable States in Multithreading - Different states while thread is in runnable states

A thread is a lightweight process.While dealing with one thread called single thread and with more thread called multi thread.

Main Thread :
                     
When a standalone application is running it is in main thread. What created inside is called  child thread.

Life Cycle Of Thread or States Of Thread :
     
           New State:
                       
When it is created and is when the thread is not alive ie, before start( ).

           Runnable (ready to run) State:
                        
After invoking start( ) it goes to runnable state.
                        Can return to this state after running, waiting, sleeping or back from blocked state.

           Running State:
                        
This state is at executing state.
         
           Dead State:
                        
This state begins when run( ) methods completes, from here it will never run again.

           Blocked State:
                        
A thread can enter in this state because of waiting the resources that are hold by another
                        thread.                            



Baca Selengkapnya ....
Trik SEO Terbaru support Online Shop Baju Wanita - Original design by Bamz | Copyright of android populer.