Skip to content

Commit 0aebcb7

Browse files
author
Tim Watson
committed
clarify channel thread safety in javadoc
1 parent 79219a6 commit 0aebcb7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/com/rabbitmq/client/Channel.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,12 @@
4545
* </ul>
4646
* <p>
4747
*
48-
* While a Channel can be used by multiple threads, it's important to ensure
49-
* that only one thread executes a command at once. Concurrent execution of
50-
* commands will likely cause an UnexpectedFrameError to be thrown.
48+
* <p>
49+
* {@link Channel} instances are safe for use by multiple
50+
* threads. Requests into a {@link Channel} are serialized, with only one
51+
* thread running commands at a time.
52+
* As such, applications may prefer using a {@link Channel} per thread
53+
* instead of sharing the same <code>Channel</code> across multiple threads.
5154
*
5255
*/
5356

0 commit comments

Comments
 (0)