码迷,mamicode.com
首页 > 编程语言 > 详细

Java thread jargon

时间:2015-06-12 11:23:41      阅读:137      评论:0      收藏:0      [点我收藏+]

标签:

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

标签:

原文地址:http://www.cnblogs.com/kid551/p/4571140.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!