- 博客(3)
- 收藏
- 关注
转载 Java中线程状态与IO的关系
当我们用jstack查看Java线程状态时,会看到各种线程状态。当发生IO等待时(比如远程调用时),线程是什么状态呢,Blocked还是Waiting?答案是Runnable状态,是不是有些出乎意料!实际上,在操作系统层面Java的Runnable状态除了包括Running状态,还包括Ready(就绪状态,等待CPU调度)和IO Wait等状态。如上图,Runnable状态的注解明确说明了,在JVM层面执行的线程,在操作系统层面可能在等待其他资源。如果等待的资源是CPU,在操作系统层..
2020-05-13 20:45:42
1834
转载 C++ 虚函数及其工作机制
Consider the following simple program as an example of runtime polymorphism. The main thing to note about the program is that the derived class’s function is called using a base class pointer.The id...
2020-01-08 10:19:38
193
转载 C语言 const 关键字
Const Qualifier in CThe qualifier const can be applied to the declaration of any variable to specify that its value will not be changed ( Which depends upon where const variables are stored, we may ...
2019-11-02 10:15:49
199
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人