Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #295 from rganz/master

C# mtserver not working
  • Loading branch information...
commit a99b038f139d41cc4d161acd9af1df5b19240bac 2 parents 76710f5 + e3b1b22
@hintjens hintjens authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 examples/C#/mtserver.cs
View
5 examples/C#/mtserver.cs
@@ -8,6 +8,7 @@
using System.Text;
using System.Threading;
using ZeroMQ;
+using ZeroMQ.Devices;
namespace zguide.mtserver
{
@@ -18,14 +19,16 @@ public static void Main(string[] args)
using (var context = ZmqContext.Create())
{
- using (var queue = new ZeroMQ.Devices.QueueDevice(context, "tcp://*:5555", "inproc://workers"))
+ using (var queue = new ZeroMQ.Devices.QueueDevice(context, "tcp://*:5555", "inproc://workers", DeviceMode.Blocking))
{
+ queue.Initialize();
var workerThreads = new Thread[5];
for (int threadId = 0; threadId < workerThreads.Length; threadId++)
{
workerThreads[threadId] = new Thread(WorkerRoutine);
workerThreads[threadId].Start(context);
}
+ queue.Start();
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.