summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Garnock-Jones <tonygarnockjones@gmail.com>2010-02-18 17:31:22 +1300
committerTony Garnock-Jones <tonygarnockjones@gmail.com>2010-02-18 17:31:22 +1300
commitf4aa195594ce7e770f9b21ad9549c1780c5e97bb (patch)
treea2dd8347c392d19cb6144b115da84ad6de5bf337
parent5568ccff3edef70041e45910077ed0ee17a435d7 (diff)
downloadrabbitmq-c-github-ask-f4aa195594ce7e770f9b21ad9549c1780c5e97bb.tar.gz
Note in the README the lack of support for pthreads
-rw-r--r--README20
1 files changed, 20 insertions, 0 deletions
diff --git a/README b/README
index 3308d9d..b0d8b31 100644
--- a/README
+++ b/README
@@ -84,3 +84,23 @@ terminal window:
----
00000000: 68 65 6C 6C 6F 20 77 6F : 72 6C 64 hello world
0000000B:
+
+## Writing applications using `librabbitmq`
+
+Please see the `examples` directory for short examples of the use of
+the `librabbitmq` library.
+
+### Threading
+
+You cannot share a socket, an `amqp_connection_state_t`, or a channel
+between threads using `librabbitmq`. The `librabbitmq` library is
+built with event-driven, single-threaded applications in mind, and
+does not yet cater to any of the requirements of `pthread`ed
+applications.
+
+Your applications instead should open an AMQP connection (and an
+associated socket, of course) per thread. If your program needs to
+access an AMQP connection or any of its channels from more than one
+thread, it is entirely responsible for designing and implementing an
+appropriate locking scheme. It will generally be much simpler to have
+a connection exclusive to each thread that needs AMQP service.