From 7a8f702e750337a19405b6f218f27c7cb958713f Mon Sep 17 00:00:00 2001 From: Colin Sullivan Date: Mon, 28 Nov 2016 17:01:39 -0700 Subject: [PATCH] Set the subscriber message delivery task to long running. (#140) 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. --- NATS.Client/AsyncSub.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NATS.Client/AsyncSub.cs b/NATS.Client/AsyncSub.cs index 0e514a9e4..3075a47b6 100755 --- a/NATS.Client/AsyncSub.cs +++ b/NATS.Client/AsyncSub.cs @@ -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;