In Java thread topic, the task to be executed and the thread to drive the task are two concepts should be clarified. The working process is like the following:

  1. Create one task
  2. Create one thread to be attached on your created task.

In Java, thread is not the task itself. The Runnable interface is used to describe the real task. Also, the name of Runnable is a bad choice for describing its job.

So, let's summarize these concepts with Java code:

[Concepts: Java Implementation]

  • task: described by Java interface Runnable.
  • mechanism to drive task: Java's Thread class.

Java thread jargon的更多相关文章

  1. Java Thread 的 sleep() 和 wait() 的区别

    Java Thread 的使用 Java Thread 的 run() 与 start() 的区别 Java Thread 的 sleep() 和 wait() 的区别       1. sleep ...

  2. Java Thread 的 run() 与 start() 的区别

    Java Thread 的使用 Java Thread 的 run() 与 start() 的区别 Java Thread 的 sleep() 和 wait() 的区别             1. ...

  3. Java Thread wait, notify and notifyAll Example

    Java Thread wait, notify and notifyAll Example Java线程中的使用的wait,notify和nitifyAll方法示例. The Object clas ...

  4. java: Thread 和 runnable线程类

    java: Thread 和 runnable线程类 Java有2种实现线程的方法:Thread类,Runnable接口.(其实Thread本身就是Runnable的子类) Thread类,默认有ru ...

  5. Java Thread join() 的用法

    Java Thread中, join() 方法主要是让调用改方法的thread完成run方法里面的东西后, 在执行join()方法后面的代码.示例: class ThreadTesterA imple ...

  6. 性能分析之-- JAVA Thread Dump 分析综述

    性能分析之-- JAVA Thread Dump 分析综述       一.Thread Dump介绍 1.1什么是Thread Dump? Thread Dump是非常有用的诊断Java应用问题的工 ...

  7. Java Thread线程控制

    一.线程和进程 进程是处于运行中的程序,具有一定的独立能力,进程是系统进行资源分配和调度的一个独立单位. 进程特征: A.独立性:进程是系统中独立存在的实体,可以拥有自己独立的资源,每个进程都拥有自己 ...

  8. [译]Java Thread wait, notify和notifyAll示例

    Java Thread wait, notify和notifyAll示例 Java上的Object类定义了三个final方法用于不同线程间关于某资源上的锁状态交互,这三个方法是:wait(), not ...

  9. [译]Java Thread Sleep示例

    Java Thread Sleep示例 java.lang.Thread sleep(long millis)方法被用来暂停当前线程的执行,暂停时间由方法参数指定,单位为毫秒.注意参数不能为负数,否则 ...

随机推荐

  1. LightOJ 1094 - Farthest Nodes in a Tree(树的直径)

    http://acm.hust.edu.cn/vjudge/contest/121398#problem/H 不是特别理解,今天第一次碰到这种问题.给个链接看大神的解释吧 http://www.cnb ...

  2. python学习笔记-Day4(2)

    正则表达式 语法: import re #导入模块名 p = re.compile("^[0-9]") #生成要匹配的正则对象 , ^代表从开头匹配,[0-9]代表匹配0至9的任意 ...

  3. Oracle常量

    Oracle是有常量的,而SqlServer是没有常量的 queryFrom constant ) := ' hello ';

  4. 【随笔】vmstat性能监测

    vmstat命令是最常见的Linux/Unix监控工具,可以展现给定时间间隔的服务器的状态值,包括服务器的CPU使用率,内存使用,虚拟内存交换情况,IO读写情况.相比top,vmstat可以看到整个机 ...

  5. Linux2

    linux开源软件 :apache软件 nginx支持更高的并发访问 MySQL PHP samba mongoDB python 应用领域: 一:服务器  二:嵌入式

  6. Odoo report

  7. 清空form表单下所有的input值-------------jquery

    $(':input','#' + formid).not(':button, :submit, :reset').val('').removeAttr('checked').removeAttr('s ...

  8. java获取系统信息

    public class SystemInfo { public static void main(String[] args) { //系统属性 Properties prop = System.g ...

  9. HashMap源码解析

    本文转载摘录自http://www.importnew.com/20386.html Java为数据结构中的映射定义了一个接口java.util.Map,此接口主要有四个常用的实现类,分别是HashM ...

  10. Mysql --分区表(1)

    检查是否支持分区 通过如下命令检查的Mysql是否支持partition mysql> SHOW PLUGINS; ... | ARCHIVE | ACTIVE | STORAGE ENGINE ...