diff options
| author | Yong He <yonghe@outlook.com> | 2022-01-10 13:16:30 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-10 13:16:30 -0800 |
| commit | 0ac19741937e007ebb45791f53d413d21055feda (patch) | |
| tree | e058c07fef9138941b253116c1d8a434c334ab67 /source/core/slang-writer.cpp | |
| parent | 36e9276b1799b476f12db9b24d3073ceef3b7594 (diff) | |
Enable running tests in parallel. (#2078)
* Enable running tests in parallel.
* Fix linux build.
* Add pthread dependency for slang-test.
* Fix teamcity output.
* Fix race condition.
* Make testReporter thread safe.
* Clean up.
* Fix.
* trigger build
* Fix.
Co-authored-by: Yong He <yhe@nvidia.com>
Co-authored-by: Theresa Foley <tfoleyNV@users.noreply.github.com>
Diffstat (limited to 'source/core/slang-writer.cpp')
| -rw-r--r-- | source/core/slang-writer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/core/slang-writer.cpp b/source/core/slang-writer.cpp index 3b1a5756a..849cb2da0 100644 --- a/source/core/slang-writer.cpp +++ b/source/core/slang-writer.cpp @@ -71,6 +71,7 @@ ISlangUnknown* BaseWriter::getInterface(const Guid& guid) SLANG_NO_THROW char* SLANG_MCALL AppendBufferWriter::beginAppendBuffer(size_t maxNumChars) { + mutex.lock(); m_appendBuffer.setCount(maxNumChars); return m_appendBuffer.getBuffer(); } @@ -82,6 +83,7 @@ SLANG_NO_THROW SlangResult SLANG_MCALL AppendBufferWriter::endAppendBuffer(char* SlangResult res = write(buffer, numChars); // Clear so that buffer can't be written from again without assert m_appendBuffer.clear(); + mutex.unlock(); return res; } |
