diff options
author | Martin Lucina <mato@kotelna.sk> | 2010-12-01 10:57:37 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-12-01 10:57:37 +0100 |
commit | b70d628fad5ab97d24473b83fd18997b4e87477d (patch) | |
tree | 71d2556da535ece2407db7f983a30cf7a04419dc /doc/zmq.txt | |
parent | 5bb0a339be31064900257e04e2ffd32e80911d63 (diff) |
Documentation updates for 2.1
- Clarify ZMQ_LINGER, zmq_close (), zmq_term () relationship
- New socket options
- Clarify thread safety of sockets and migration between threads
- Other minor and spelling fixes
Signed-off-by: Martin Lucina <mato@kotelna.sk>
Diffstat (limited to 'doc/zmq.txt')
-rw-r--r-- | doc/zmq.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/zmq.txt b/doc/zmq.txt index 06658c9..0c29a74 100644 --- a/doc/zmq.txt +++ b/doc/zmq.txt @@ -44,9 +44,15 @@ Terminate 0MQ context:: Thread safety ^^^^^^^^^^^^^ A 0MQ 'context' is thread safe and may be shared among as many application -threads as necessary, without any additional locking required on the part of the -caller. Each 0MQ socket belonging to a particular 'context' may only be used -by *the thread that created it* using _zmq_socket()_. +threads as necessary, without any additional locking required on the part of +the caller. + +Individual 0MQ 'sockets' are _not_ thread safe except in the case where full +memory barriers are issued when migrating a socket from one thread to another. +In practice this means applications can create a socket in one thread with +_zmq_socket()_ and then pass it to a _newly created_ thread as part of thread +initialization, for example via a structure passed as an argument to +_pthread_create()_. Multiple contexts |