java Thread 接口学习

对于程序员来说 Thread应该都不会陌生,具体的接口调用不是本篇的重点。Thread的基本概念及接口的使用:java多线程

下面将更多的从底层实现角度讲一下Thread。

Thread的声明如下:

class Thread implements Runnable Runnable 接口是个什么鬼?

public interface Runnable { /** * When an object implementing interface <code>Runnable</code> is used * to create a thread, starting the thread causes the object's * <code>run</code> method to be called in that separately executing * thread. * <p> * The general contract of the method <code>run</code> is that it may * take any action whatsoever. * * @see java.lang.Thread#run() */ public abstract void run(); }

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zyxxdd.html