Permalink
Browse files

Merge pull request #295 from rganz/master

C# mtserver not working
  • Loading branch information...
2 parents 76710f5 + e3b1b22 commit a99b038f139d41cc4d161acd9af1df5b19240bac @hintjens hintjens committed Feb 19, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 examples/C#/mtserver.cs
View
@@ -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();
}
}

0 comments on commit a99b038

Please sign in to comment.