Skip to content

Commit

Permalink
Set the subscriber message delivery task to long running. (#140)
Browse files Browse the repository at this point in the history
This helps ensure the message delivery task gets enough resources to perform.  Some systems may not dedicate enough resources, and since there is the SubscriberDeliveryTaskCount option available, this can be long running.
  • Loading branch information
Colin Sullivan committed Nov 29, 2016
1 parent 5151c97 commit 7a8f702
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion NATS.Client/AsyncSub.cs
Expand Up @@ -81,7 +81,8 @@ internal void enableAsyncProcessing()
{
if (ownsChannel && msgFeeder == null)
{
msgFeeder = new Task(() => { conn.deliverMsgs(mch); });
msgFeeder = new Task(() => { conn.deliverMsgs(mch); },
TaskCreationOptions.LongRunning);
msgFeeder.Start();
}
started = true;
Expand Down

0 comments on commit 7a8f702

Please sign in to comment.