Primary Thread Methods
There are a number of important Thread methods, some of which you've already seen:
start()—Moves a thread from the initialized state to the runnable state. This does not make the thread execute. It makes the thread eligible for execution whenever it is scheduled.
Caution
Operating systems differ in the way they schedule threads . Solaris 7, for example, uses pre-emptive multitasking, whereas Windows 95 uses round-robin time slicing. Because Java is platform-neutral, it can run on any number of systems, any of which can have a different scheme for scheduling threads. You can't predict how long a given thread will execute for before it is interrupted or pre-empted, even on a specific system. You cannot write code that ...
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