next

suspend fun next(): T?

Retrieves the next element in the set infinitely.

This method retrieves the next element in the set in a thread-safe approach.

Return

The next element in the set, or null if the set is empty.