open fun offer(element: E): Boolean (source)

Deprecated: DeprecationLevel.WARNING

Deprecated offer method.

This method was deprecated in the favour of trySend. It has proven itself as the most error-prone method in Channel API:

NB Automatic migration provides best-effort for the user experience, but requires removal or adjusting of the code that relied on the exception handling. The complete replacement has a more verbose form:

    .onClosed { throw it ?: ClosedSendChannelException("Channel was closed normally") }

See for more context.