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

Assorted threading and undefined behaviour fixes

This commit is contained in:
Tom Poole 2017-12-07 17:25:57 +00:00
parent 36da4cde05
commit 8cecf0baf9
12 changed files with 121 additions and 42 deletions

View file

@ -176,7 +176,7 @@ namespace DestinationTestHelpers
std::deque<AnalyticsEvent>& unloggedEvents)
: TestDestination (loggedEvents, unloggedEvents)
{
startAnalyticsThread (100);
startAnalyticsThread (20);
}
virtual ~BasicDestination()
@ -303,12 +303,14 @@ struct ThreadedAnalyticsDestinationTests : public UnitTest
beginTest ("Basic");
{
DestinationTestHelpers::BasicDestination destination (loggedEvents, unloggedEvents);
{
DestinationTestHelpers::BasicDestination destination (loggedEvents, unloggedEvents);
for (auto& event : testEvents)
destination.logEvent (event);
for (auto& event : testEvents)
destination.logEvent (event);
Thread::sleep (400);
Thread::sleep (400);
}
compareEventQueues (loggedEvents, testEvents);
expect (unloggedEvents.size() == 0);