From caee572ff94822ca2ed354fcb79ca04ed9adf388 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 5 Aug 2024 12:44:59 -0700 Subject: Perhaps fixed a Myriad race condition. If so, this will fix the issue where streams randomly truncate when accessed by multiple threads. --- src/stable/myriad.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/stable/myriad.h') 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 class Stream { public: + void setSize( int iNewSize ); + void growTo( int iNewSize ); + int getSize() const; + int iId; - int iSize; BlockArray aBlocks; + + private: + int iSize; + mutable Bu::Mutex mStream; }; typedef Bu::Array StreamArray; -- cgit v1.2.3