Skip to content

Instantly share code, notes, and snippets.

@gaurav-teliax
Last active August 7, 2017 09:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gaurav-teliax/ebce15adb300e4416547e90f33a48456 to your computer and use it in GitHub Desktop.
Save gaurav-teliax/ebce15adb300e4416547e90f33a48456 to your computer and use it in GitHub Desktop.
## Thread a ## Thread b
## write_socket.send ["message-1", "from-thread-1"] |
[STEP-1.1] zmq.send "message-1" |
Context Switch happen
|
| write_socket.send ["message-1", "from-thread-1"]
| [STEP-2.1] zmq.send "message-2"
| [STEP-2.2] zmq.send "from-thread-2", SEND::MORE
[STEP-1.2] zmq.send "from-thread-1", SEND::MORE |
Receive now get message in random order right ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment