ThreadUtils
final class ThreadUtils
Package: dev.joid.lib.utils.thread · Module: core · Source: ThreadUtils.java
Creates daemon threads and runs a task on the render thread.
Learn more
Section titled “Learn more”Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
ThreadFactory | daemonFactory(String name) static | Returns a thread factory whose threads are daemons named name/1, name/2…, so they never keep the program running. |
Thread | daemonThread(Runnable task, String name) static | Returns a daemon thread named name that runs task, not started. |
void | runOnRenderThread(Runnable task) static | Runs task at once on the render thread, or hands it to the thread bridge, which runs it on the render thread at the next frame. |
Method details
Section titled “Method details”daemonFactory
Section titled “daemonFactory”ThreadFactory daemonFactory(String name) static
Returns a thread factory whose threads are daemons named name/1, name/2…, so they never keep the program running.
daemonThread
Section titled “daemonThread”Thread daemonThread(Runnable task, String name) static
Returns a daemon thread named name that runs task, not started.
runOnRenderThread
Section titled “runOnRenderThread”void runOnRenderThread(Runnable task) static
Runs task at once on the render thread, or hands it to the thread bridge, which runs it on the render thread at the next frame.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
