mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
add doc for SingleAlarm
GitOrigin-RevId: 68a35ed4351e01ab44fedf2e0121de4ab6e2196b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1dd10b2cfc
commit
7ba74edcce
@@ -10,6 +10,14 @@ import java.util.concurrent.ExecutionException
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.TimeoutException
|
||||
|
||||
/**
|
||||
* Allows scheduling a single `Runnable` instance ([task]) to be executed after a specific time interval on a specific thread.
|
||||
* [request] adds a request if it's not scheduled yet, i.e., it does not delay execution of the request
|
||||
* [cancelAndRequest] cancels the current request and schedules a new one instead, i.e., it delays execution of the request
|
||||
*
|
||||
* Consider using a [kotlinx.coroutines.flow.Flow] with [kotlinx.coroutines.flow.debounce] and [kotlinx.coroutines.flow.sample] instead
|
||||
*/
|
||||
|
||||
class SingleAlarm @JvmOverloads constructor(
|
||||
private val task: Runnable,
|
||||
private val delay: Int,
|
||||
|
||||
Reference in New Issue
Block a user