You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Michael Andre Pearce (Jira)" <ji...@apache.org> on 2020/11/30 19:50:00 UTC

[jira] [Commented] (AMQNET-649) bugs in PooledTaskRunner.cs

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

Michael Andre Pearce commented on AMQNET-649:
---------------------------------------------

Youll be best by opening a pr in github with both a test case demonstrating the issue along with the fix

> bugs in PooledTaskRunner.cs
> ---------------------------
>
>                 Key: AMQNET-649
>                 URL: https://issues.apache.org/jira/browse/AMQNET-649
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.7.2
>            Reporter: JEFF ANDERSON
>            Priority: Major
>         Attachments: PooledTaskRunner.cs
>
>
> Although the 1.7.2 release of the AMQ .net client uses the DedicatedTaskRunner runner by default. We compile from source and use PooledTaskRunner.cs for performance reasons. However this code has some bugs. Namely the Shutdown() method will deadlock on a call to Thread.Sleep with infinite timespan. If you look at the Java source for PooledTaskRunner, it looks like the C# port is missing the thread synchronization logic that the Java implementation has. I've attached a version which corrects this and makes it in-line with the Java implementation and corrects the logic in Shutdown which needs to be a synchronized wait (e.g., Monitor.Wait())



--
This message was sent by Atlassian Jira
(v8.3.4#803005)