[
https://issues.apache.org/jira/browse/PROTON-2830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timothy A. Bish updated PROTON-2830:
------------------------------------
Summary: [proton-dotnet] ClientStreamSender lacks async variant of
BeginMessage (was: ClientStreamSender lacks async variant of BeginMessage)
> [proton-dotnet] ClientStreamSender lacks async variant of BeginMessage
> ----------------------------------------------------------------------
>
> Key: PROTON-2830
> URL: https://issues.apache.org/jira/browse/PROTON-2830
> Project: Qpid Proton
> Issue Type: Bug
> Components: proton-dotnet
> Affects Versions: proton-dotnet-1.0.0-M10
> Reporter: Yuriy Lepikhov
> Assignee: Timothy A. Bish
> Priority: Minor
>
> ClientStreamSender.BeginMessage is blocking and shouldn't be called in
> EventLoop callback.
> Call of ClientStreamSender.BeginMessage from EventLoop callback leads to
> deadlock.
> For example:
> {code:java}
> using var sender = await
> connection.OpenStreamSenderAsync(address).ConfigureAwait(false);
> // coninuation will be executed in EventLoop callback, but BeginMessage
> publishes event to EventLoop and blocks = deadlock
> var message = sender.BeginMessage(); {code}
> In general it is good idea not to mix sync and async calls, and
> BeginMessageAsync would help in this situation.
>
> Also, is it necessary to introduce new API such as EventLoop whereas
> TaskFactory already exists?
> May be something like this would be useful:
> {code:java}
> ConcurrentExclusiveSchedulerPair concurrentExclusiveSchedulerPair = new
> ConcurrentExclusiveSchedulerPair(TaskScheduler.Default, 1, 1);
> TaskFactory taskFactory = new
> TaskFactory(concurrentExclusiveSchedulerPair.ExclusiveScheduler);
> // ...
> taskFactory.StartNew(...); {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]