Browse Source

This will hopefully fix the github Linux Debug build

Jorrit Rouwe 4 years ago
parent
commit
ead1e50545
2 changed files with 1 additions and 7 deletions
  1. 0 6
      Jolt/Core/JobSystemThreadPool.cpp
  2. 1 1
      UnitTests/UnitTestFramework.cpp

+ 0 - 6
Jolt/Core/JobSystemThreadPool.cpp

@@ -413,9 +413,6 @@ void JobSystemThreadPool::QueueJobInternal(Job *inJob)
 	// it if there's not enough space in the queue.
 	// it if there's not enough space in the queue.
 	uint head = GetHead();
 	uint head = GetHead();
 
 
-	// Keep track of how many times we slept
-	JPH_IF_ENABLE_ASSERTS(int sleep_count = 0;)
-
 	for (;;)
 	for (;;)
 	{
 	{
 		// Check if there's space in the queue
 		// Check if there's space in the queue
@@ -429,9 +426,6 @@ void JobSystemThreadPool::QueueJobInternal(Job *inJob)
 			// Second check if there's space in the queue
 			// Second check if there's space in the queue
 			if (old_value - head >= cQueueLength)
 			if (old_value - head >= cQueueLength)
 			{
 			{
-				// If we keep sleeping, something's wrong.
-				JPH_ASSERT(sleep_count++ < 10, "Queue is not being processed quickly enough / too small!");
-
 				// Wake up all threads in order to ensure that they can clear any nullptrs they may not have processed yet
 				// Wake up all threads in order to ensure that they can clear any nullptrs they may not have processed yet
 				mSemaphore.Release((uint)mThreads.size()); 
 				mSemaphore.Release((uint)mThreads.size()); 
 
 

+ 1 - 1
UnitTests/UnitTestFramework.cpp

@@ -44,7 +44,7 @@ static bool AssertFailedImpl(const char *inExpression, const char *inMessage, co
 	snprintf(buffer, sizeof(buffer), "%s:%u: (%s) %s", inFile, inLine, inExpression, inMessage != nullptr? inMessage : "");
 	snprintf(buffer, sizeof(buffer), "%s:%u: (%s) %s", inFile, inLine, inExpression, inMessage != nullptr? inMessage : "");
 
 
 	// Forward to doctest
 	// Forward to doctest
-	FAIL(buffer);
+	FAIL_CHECK(buffer);
 
 
 	// No breakpoint
 	// No breakpoint
 	return false;
 	return false;