diff options
author | Mike Buland <eichlan@xagasoft.com> | 2014-08-14 15:49:05 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2014-08-14 15:49:05 +0000 |
commit | c5f69c22ca51510da1674bf56982f8f1e3ca4a40 (patch) | |
tree | 344332bc84359d6da4e626ede92bf31ae5d1a52b /src/stable/client.h | |
parent | d55d73c7050e6452f18678e60b42a088175cb7ce (diff) | |
download | libbu++-c5f69c22ca51510da1674bf56982f8f1e3ca4a40.tar.gz libbu++-c5f69c22ca51510da1674bf56982f8f1e3ca4a40.tar.bz2 libbu++-c5f69c22ca51510da1674bf56982f8f1e3ca4a40.tar.xz libbu++-c5f69c22ca51510da1674bf56982f8f1e3ca4a40.zip |
Neither the Bu::Client class or the Bu::ProtocolTelnet class were threadsafe
and both really need to be. Bu::Client is used in multi-threaded applications
and has been for a while, so it's a no brainer. It may need a little bit more
safety added around variable access, but all the buffers are safe now.
ProtocolTelnet has it's own issus, and I should probably rework a few parts of
it before too long so we can better accomidate things like line editing.
Diffstat (limited to 'src/stable/client.h')
-rw-r--r-- | src/stable/client.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stable/client.h b/src/stable/client.h index 89e8144..ac882eb 100644 --- a/src/stable/client.h +++ b/src/stable/client.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #include "bu/config.h" | 13 | #include "bu/config.h" |
14 | #include "bu/string.h" | 14 | #include "bu/string.h" |
15 | #include "bu/queuebuf.h" | 15 | #include "bu/queuebuf.h" |
16 | #include "bu/mutex.h" | ||
16 | 17 | ||
17 | namespace Bu | 18 | namespace Bu |
18 | { | 19 | { |
@@ -127,6 +128,8 @@ namespace Bu | |||
127 | Bu::QueueBuf qbWrite; | 128 | Bu::QueueBuf qbWrite; |
128 | bool bWantsDisconnect; | 129 | bool bWantsDisconnect; |
129 | class Bu::ClientLinkFactory *pfLink; | 130 | class Bu::ClientLinkFactory *pfLink; |
131 | Bu::Mutex mRead; | ||
132 | Bu::Mutex mWrite; | ||
130 | }; | 133 | }; |
131 | } | 134 | } |
132 | 135 | ||