[ 
https://issues.apache.org/jira/browse/PROTON-2830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17854173#comment-17854173
 ] 

Timothy A. Bish commented on PROTON-2830:
-----------------------------------------

{quote}
Also, is it necessary to introduce new API such as EventLoop whereas 
TaskFactory already exists?
{quote}

If you are unhappy with the free client implementation then you can use the 
proton engine to implement a client based off the existing source.  

> [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: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to