SubscriberManager

A class that manages the job that waits for subscribers to appear. This job is set by the awaitSubscribersPlugin when the store is launched. Use await or complete to manage the job. You can only complete the job once per one start of the store.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
suspend fun await()

Start waiting for subscribers, suspending until the given number of subscribers arrive. After the subscribers arrived, this call will return immediately

Link copied to clipboard
fun complete()

Complete the wait period, freeing the store and coroutines that called await to continue.

Link copied to clipboard
suspend fun completeAndWait(): Unit?

Same as complete, but suspends until completion