Skip to content

Commit

Permalink
doc: clarify thread-safety (or not) in IPC doc
Browse files Browse the repository at this point in the history
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
  • Loading branch information
chrissie-c committed Mar 24, 2017
1 parent 59eacf0 commit 60122a4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions docs/mainpage.h
Expand Up @@ -95,11 +95,15 @@
* very high performance.
*
* @par Multithreading
* As of current implementation, there are not many guarantees about ipc system
* being thread-safe. What remains there is mostly owing to the encapsulation
* of independent IPC connections. Therefore it is highly recommended to have
* a single one pushed throughout its lifecycle just with a single thread;
* anything else would likely warrant external synchronization enforcement.
* There are not many guarantees about the ipc system being thread-safe.
* It is essential that all sends and all receives are in their own thread,
* though having separate threads for each is supported.
*
* If you need to send on multiple threads then either use locking
* or create a separate connection for each thread. In practice this
* should not be a problem as multi-threaded sends will just end up with
* mixed-up replies.

This comment has been minimized.

Copy link
@jnpkrn

jnpkrn Apr 4, 2017

Contributor

Well, not sure if I am getting it right, but

mixed-up replies

doesn't sound as something that one is free to disregard completely.

Would it make sense to elaborate some more on this?

*
*
* @par Client API
* @copydoc qbipcc.h
Expand Down

2 comments on commit 60122a4

@chrissie-c
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't even remember what I meant when I wrote that! I will try and clarify the clarification

@jnpkrn
Copy link
Contributor

@jnpkrn jnpkrn commented on 60122a4 May 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For posterity, addressed with f38a877.

Please sign in to comment.