Replies: 1 comment
-
muduo/examples/idleconnection is a single thread program. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
muduo/examples/idleconnection/echo.h
Line 9 in 90920bb
https://www.boost.org/doc/libs/1_54_0/libs/circular_buffer/doc/circular_buffer.html#threadsafety
If multiple threads access a single circular_buffer, and at least one of the threads may potentially write, then the user is responsible for ensuring mutual exclusion between the threads during the container accesses. The mutual exclusion between the threads can be achieved by wrapping operations of the underlying circular_buffer with a lock acquisition and release.
does ::onCnnection and ::onMessage always run in a single thread?
Beta Was this translation helpful? Give feedback.
All reactions