About Question com.enthuware.ets.scjp.v6.2.183 :
Moderator: admin
-
- Posts: 27
- Joined: Mon Sep 22, 2014 1:30 pm
- Contact:
About Question com.enthuware.ets.scjp.v6.2.183 :
I know the OS decides when it starts but isn't it the thread's run method implementation which usually decides for how much time it runs?
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question com.enthuware.ets.scjp.v6.2.183 :
No, actually, the programmer's code decides when a thread is started (when you call its start method) but only the JVM can decide how long and when a thread will actually get to run (before the thread's run method terminates, of course).
In other words, JVM cannot automatically start a thread and a programmer cannot tell when a thread will actually run.
HTH,
Paul.
In other words, JVM cannot automatically start a thread and a programmer cannot tell when a thread will actually run.
HTH,
Paul.
Who is online
Users browsing this forum: No registered users and 7 guests