postSuspending

fun <ERROR CLASS>.postSuspending(event: <ERROR CLASS>, plugin: <ERROR CLASS>): Collection<<ERROR CLASS>>

Calls an event with the given details. If there are multiple suspend event receivers, each receiver is executed concurrently. Allows to await the completion of suspending event listeners.

Return

Collection of awaitable jobs. This job list may be empty if no suspending listener was called. Each job instance represents an awaitable job for each method being called in each suspending listener. For awaiting use callSuspendingEvent(..).joinAll().

Parameters

event

Event details.

plugin

PluginContainer plugin.

fun <ERROR CLASS>.postSuspending(event: <ERROR CLASS>, plugin: <ERROR CLASS>, eventExecutionType: EventExecutionType): Collection<<ERROR CLASS>>

Calls an event with the given details. Allows to await the completion of suspending event listeners.

Return

Collection of awaitable jobs. This job list may be empty if no suspending listener was called. Each job instance represents an awaitable job for each method being called in each suspending listener. For awaiting use callSuspendingEvent(..).joinAll().

Parameters

event

Event details.

plugin

Plugin plugin.

eventExecutionType

Allows to specify how suspend receivers are executed.