Skip to content

Commit 7345669

Browse files
committed
test
1 parent 8e58c43 commit 7345669

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/geode/basic/database.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,14 @@ namespace geode
6262
Logger::debug( count_, " -> ", "~Storage" );
6363
terminate_storage();
6464
std::unique_lock< std::mutex > locking{ lock_ };
65-
while( !queue_.empty() )
65+
do
6666
{
67-
Logger::debug( count_, " -> ", "Q ", queue_.size() );
6867
clean_queue();
69-
Logger::debug( count_, " -> ", "Q2 ", queue_.size() );
70-
condition_.wait( locking );
71-
}
68+
69+
} while( !condition_.wait_for(
70+
locking, std::chrono::milliseconds( 1 ), [this] {
71+
return queue_.empty();
72+
} ) );
7273
Logger::debug( count_, " -> ", "~Storage end" );
7374
}
7475

0 commit comments

Comments
 (0)