Skip to content


Subversion checkout URL

You can clone with
Download ZIP


C# mtserver not working #295

merged 1 commit into from

2 participants


mtserver was compiling, but the worker threads couldn't connect because the queue was not initialized and the main thread was immediately finished. So I changed the mode of the queue to blocking.

@hintjens hintjens merged commit a99b038 into imatix:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 19, 2013
  1. @rganz
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 1 deletion.
  1. +4 −1 examples/C#/mtserver.cs
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);
+ queue.Start();
Something went wrong with that request. Please try again.