From c5f69c22ca51510da1674bf56982f8f1e3ca4a40 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 14 Aug 2014 15:49:05 +0000 Subject: 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. --- src/stable/client.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/stable/client.h') 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 @@ #include "bu/config.h" #include "bu/string.h" #include "bu/queuebuf.h" +#include "bu/mutex.h" namespace Bu { @@ -127,6 +128,8 @@ namespace Bu Bu::QueueBuf qbWrite; bool bWantsDisconnect; class Bu::ClientLinkFactory *pfLink; + Bu::Mutex mRead; + Bu::Mutex mWrite; }; } -- cgit v1.2.3