Skip to content

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.

ReturnsSignatureSummary
ThreadFactorydaemonFactory(String name) staticReturns a thread factory whose threads are daemons named name/1, name/2…, so they never keep the program running.
ThreaddaemonThread(Runnable task, String name) staticReturns a daemon thread named name that runs task, not started.
voidrunOnRenderThread(Runnable task) staticRuns 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.

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.


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

Report a problem with this page