You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to build a ActorCoroutine via a Channel with Conflated Behavior and capacity.
Reading the documentation, Channel should be build with capacity > 0 and, BufferOverFlow.DROP_OLDEST or BufferOverFlow.DROP_LATEST to accomplisth this.
publicfun <E> Channel (
capacity:Int = RENDEVZOUD,
onBufferOverflow:BufferOverflow = BufferOverflow.SUSPEND, // use BufferOverflow.DROP_LATEST or BufferOverflow.DROP_OLDESTonUndeliveredElement: ((E) ->Unit)? = null
)
However, the public actor API does not provide the way to build a Channel with BufferOverFlow Option
I tried to make a custom actor builder API, but ActorCoroutine and LazyActorCoroutine inside the actor builder is package private so this won't work. Is there a reason to restrict this behavior? or can you change the API like below?
Use case
I want to build a ActorCoroutine via a Channel with Conflated Behavior and capacity.
Reading the documentation, Channel should be build with capacity > 0 and, BufferOverFlow.DROP_OLDEST or BufferOverFlow.DROP_LATEST to accomplisth this.
However, the public actor API does not provide the way to build a Channel with BufferOverFlow Option
I tried to make a custom actor builder API, but ActorCoroutine and LazyActorCoroutine inside the actor builder is package private so this won't work. Is there a reason to restrict this behavior? or can you change the API like below?
The Shape of the API
The text was updated successfully, but these errors were encountered: