1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

NamedPipe: Fix potential vptr data-race in unit tests

This commit is contained in:
reuk 2020-11-23 13:45:21 +00:00
parent 389e7436ef
commit ac612693aa

View file

@ -210,11 +210,6 @@ private:
pipe.openExisting (pipeName);
}
~NamedPipeThread()
{
stopThread (100);
}
NamedPipe pipe;
const String& pipeName;
WaitableEvent& workCompleted;
@ -231,6 +226,11 @@ private:
sendData (sData)
{}
~SenderThread() override
{
stopThread (100);
}
void run() override
{
result = pipe.write (&sendData, sizeof (sendData), 2000);
@ -248,6 +248,11 @@ private:
: NamedPipeThread ("NamePipeSender", pName, shouldCreatePipe, completed)
{}
~ReceiverThread() override
{
stopThread (100);
}
void run() override
{
result = pipe.read (&recvData, sizeof (recvData), 2000);