core / pragma.utils /
Package pragma.utils #
Types #
| Name | Summary |
|---|---|
AlertingMutex is an implementation of the Mutex interface that will log a warning if it cannot obtain a lock after 1 minute. | |
Algorithm from: https://arxiv.org/ftp/arxiv/papers/1406/1406.2294.pdf. | |
MetrickingMutex is an implementation of the Mutex interface that will log a warning and increment the "pragma.engine.mutex.waitingForLock" metric every 60s if it cannot obtain a lock. | |
A PragmaSemaphore that registers a metrics gauge for getActiveAndWaitingBlockCount. | |
Simple wrapper around ProcessBuilder to allow for dependency injection for testing. |
Functions #
| Name | Summary |
|---|---|
Checks the cancellation status of the coroutine context. If the coroutine context is active, this function is a no-op. If the coroutine context is cancelled, runs the block of code and throws a CancellationException. This block cannot contain suspend calls as it is only executed in the case of a cancelling coroutine.
Checks the cancellation status of the coroutine context. If the coroutine context is active, this function is a no-op. If the coroutine context is cancelled, it runs the block of code and throws a CancellationException. This block cannot contain suspend calls as it is only executed in the case of a cancelling coroutine. | |
Receive the request as a string. | |
If this string starts with the given prefix (ignoring case), returns a copy of this string with the prefix removed. Otherwise, returns this string. | |
If this string ends with the given suffix (ignoring case), returns a copy of this string with the suffix removed. Otherwise, returns this string. | |
Returns a MethodHandle for the underlying JVM method of this Kotlin function, normalized so callers always pass arguments as (args…, continuation) regardless of whether the function is suspend. |
Properties #
| Name | Summary |
|---|---|
Cached MethodHandle dispatch for Kotlin suspend functions, used to bypass the per-call type-validation pipeline in kotlin.reflect.full.callSuspend. |