Skip to content

Commit

Permalink
Fix hanging builds
Browse files Browse the repository at this point in the history
  • Loading branch information
pevisscher committed Aug 14, 2016
1 parent 8db7abb commit dfd0c8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bsp/include/bsp/mixedBarrier.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ namespace BSPInternal
if ( i >= BSP_SPIN_ITERATIONS )
{
std::unique_lock< std::mutex > condVarLoc( mCondVarMutex );
mCurrentCon->wait( condVarLoc, [&] {return mGeneration != myGeneration;} );
mCurrentCon->wait( condVarLoc, [&] {return mGeneration != myGeneration && !aborted;} );
}
}

Expand Down
6 changes: 3 additions & 3 deletions test/testClassic.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ inline void AbortTestAllWaitExceptOne()

if ( BSPLib::ProcId() == 1 )
{
std::this_thread::sleep_for( std::chrono::milliseconds( 200 ) );
std::this_thread::sleep_for( std::chrono::milliseconds( 1 ) );
BSPLib::Classic::Abort( "" );
}

Expand All @@ -118,7 +118,7 @@ inline void AbortTestAllWaitExceptMain()

if ( BSPLib::ProcId() == 0 )
{
std::this_thread::sleep_for( std::chrono::milliseconds( 200 ) );
std::this_thread::sleep_for( std::chrono::milliseconds( 1 ) );
BSPLib::Classic::Abort( "" );
}

Expand All @@ -127,7 +127,7 @@ inline void AbortTestAllWaitExceptMain()

TEST( P( Classic ), AbortTestAllWaitExceptMain )
{
EXPECT_FALSE( BSPLib::Execute( AbortTestAllWaitExceptMain, 8 ) );
EXPECT_FALSE( BSPLib::Execute( AbortTestAllWaitExceptMain, BSPLib::NProcs() ) );
}

inline void EmptyTest()
Expand Down

0 comments on commit dfd0c8c

Please sign in to comment.