Skip to content

Commit 67c3b52

Browse files
committed
test
1 parent 98cf279 commit 67c3b52

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/geode/basic/database.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,10 @@ namespace geode
5656
{
5757
terminate_storage();
5858
std::unique_lock< std::mutex > locking{ lock_ };
59-
index_t count{ 0 };
60-
do
61-
{
62-
DEBUG( count++ );
59+
condition_.wait( locking, [this] {
6360
clean_queue();
64-
} while( !condition_.wait_for(
65-
locking, std::chrono::milliseconds( 10 ), [this] {
66-
return queue_.empty();
67-
} ) );
68-
DEBUG( "end" );
61+
return queue_.empty();
62+
} );
6963
}
7064

7165
bool expired() const
@@ -128,10 +122,11 @@ namespace geode
128122
{
129123
if( !queue_.front().ready() )
130124
{
131-
return;
125+
break;
132126
}
133127
queue_.pop();
134128
}
129+
condition_.notify_all();
135130
}
136131

137132
void wait_for_memory_release()

0 commit comments

Comments
 (0)