Package | Description |
---|---|
cn.hutool.core.thread |
提供线程及高并发封装,入口为ThreadUtil
|
Modifier and Type | Method and Description |
---|---|
static ThreadFactoryBuilder |
ThreadFactoryBuilder.create()
创建
ThreadFactoryBuilder |
static ThreadFactoryBuilder |
ThreadUtil.createThreadFactoryBuilder()
创建ThreadFactoryBuilder
|
ThreadFactoryBuilder |
ThreadFactoryBuilder.setDaemon(boolean daemon)
设置是否守护线程
|
ThreadFactoryBuilder |
ThreadFactoryBuilder.setNamePrefix(String namePrefix)
设置线程名前缀,例如设置前缀为hutool-thread-,则线程名为hutool-thread-1之类。
|
ThreadFactoryBuilder |
ThreadFactoryBuilder.setPriority(int priority)
设置线程优先级
|
ThreadFactoryBuilder |
ThreadFactoryBuilder.setThreadFactory(ThreadFactory backingThreadFactory)
设置用于创建基础线程的线程工厂
|
ThreadFactoryBuilder |
ThreadFactoryBuilder.setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler uncaughtExceptionHandler)
设置未捕获异常的处理方式
|
Copyright © 2024. All rights reserved.