From 9994b73ad0af5c9ba5fc4058234cea77d0a1ddb1 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 8 Jun 2024 17:27:50 +0200 Subject: buffer: track asynchronous buffers and don't release them until unref synchronous buffers are read instantly and we can release them, but asynchronous ones have to be locked until they are unref'd from .current to avoid reading from a buffer after .release() --- src/protocols/core/Shm.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/protocols/core/Shm.cpp') diff --git a/src/protocols/core/Shm.cpp b/src/protocols/core/Shm.cpp index 0c01cf80..ce7d3a61 100644 --- a/src/protocols/core/Shm.cpp +++ b/src/protocols/core/Shm.cpp @@ -49,6 +49,10 @@ eBufferType CWLSHMBuffer::type() { return BUFFER_TYPE_SHM; } +bool CWLSHMBuffer::isSynchronous() { + return true; +} + SSHMAttrs CWLSHMBuffer::shm() { SSHMAttrs attrs; attrs.success = true; -- cgit v1.2.3