Python Multiprocessing with ZeroMQ

Good example of ZMQ with Python and multiple processes.

Also found an issue with the example code which I have fixed below (and included a comment on the original blog post).

The first issue is the loss of indentation in the while loop inside the “worker” function, both blocks below the “while(true):” should be indented to within the loop. This is a copy and paste error as the Github source doesn’t have this problem.

The example fails to run because there are multiple uses of the same keywords but with different intentions.

For example, “result_manager” is both a function and an object, the same goes for “ventilator”.

The fix it to change the function names to “result_manager_func” and “ventilator_func” for the functions.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: