java.util.Timer的一个构造方法

论坛 期权论坛 编程之家     
选择匿名的用户   2021-6-1 16:41   46   0

public Timer(boolean isDaemon)

Creates a new timer whose associated thread may be specified to run as a daemon. A daemon thread is called for if the timer will be used to schedule repeating "maintenance activities", which must be performed as long as the application is running, but should not prolong the lifetime of the application.

如果isDaemon为true,那么创建的Timer属于守护线程,应用程序结束之后也会死亡

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP