aboutsummaryrefslogtreecommitdiff
path: root/src/stable/myriad.h
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2024-08-05 12:44:59 -0700
committerMike Buland <mike@xagasoft.com>2024-08-05 12:44:59 -0700
commitcaee572ff94822ca2ed354fcb79ca04ed9adf388 (patch)
tree4d5253c310e99a09852863024250a22d810ead7b /src/stable/myriad.h
parent5f183d4a0e7caa529db09f32848314360cecfd91 (diff)
downloadlibbu++-caee572ff94822ca2ed354fcb79ca04ed9adf388.tar.gz
libbu++-caee572ff94822ca2ed354fcb79ca04ed9adf388.tar.bz2
libbu++-caee572ff94822ca2ed354fcb79ca04ed9adf388.tar.xz
libbu++-caee572ff94822ca2ed354fcb79ca04ed9adf388.zip
Perhaps fixed a Myriad race condition.HEAD0.0.1main
If so, this will fix the issue where streams randomly truncate when accessed by multiple threads.
Diffstat (limited to 'src/stable/myriad.h')
-rw-r--r--src/stable/myriad.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/stable/myriad.h b/src/stable/myriad.h
index 14467a4..e63c29f 100644
--- a/src/stable/myriad.h
+++ b/src/stable/myriad.h
@@ -184,9 +184,16 @@ namespace Bu
184 class Stream 184 class Stream
185 { 185 {
186 public: 186 public:
187 void setSize( int iNewSize );
188 void growTo( int iNewSize );
189 int getSize() const;
190
187 int iId; 191 int iId;
188 int iSize;
189 BlockArray aBlocks; 192 BlockArray aBlocks;
193
194 private:
195 int iSize;
196 mutable Bu::Mutex mStream;
190 }; 197 };
191 typedef Bu::Array<Stream *> StreamArray; 198 typedef Bu::Array<Stream *> StreamArray;
192 199