Re: Runnable Thread State when making blocking system calls
The Java Thread state does not track arbitrary blocking operations, only those related to monitors and sleep (and related j.u.c utilities). Blocking I/O is not covered.
If the thread is blocked on a system call it is blocked – it uses as much CPU as the system call logic dictates.
From: Concurrency-interest <[hidden email]> On Behalf Of George Monet via Concurrency-interest Sent: Wednesday, December 19, 2018 8:38 AM To:[hidden email] Subject: [concurrency-interest] Runnable Thread State when making blocking system calls
I would like to know why the thread state is shown as Runnable when making a blocking system call such as readByte(); which in turn calls read() on a Linux system.
Does a Runnable state consume cpu cycles while blocking on system call?
"pool-9-thread-1" - Thread t@49
at java.io.FileInputStream.readBytes(Native Method)