We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98cf279 commit 67c3b52Copy full SHA for 67c3b52
src/geode/basic/database.cpp
@@ -56,16 +56,10 @@ namespace geode
56
{
57
terminate_storage();
58
std::unique_lock< std::mutex > locking{ lock_ };
59
- index_t count{ 0 };
60
- do
61
- {
62
- DEBUG( count++ );
+ condition_.wait( locking, [this] {
63
clean_queue();
64
- } while( !condition_.wait_for(
65
- locking, std::chrono::milliseconds( 10 ), [this] {
66
- return queue_.empty();
67
- } ) );
68
- DEBUG( "end" );
+ return queue_.empty();
+ } );
69
}
70
71
bool expired() const
@@ -128,10 +122,11 @@ namespace geode
128
122
129
123
if( !queue_.front().ready() )
130
124
131
- return;
125
+ break;
132
126
133
127
queue_.pop();
134
+ condition_.notify_all();
135
136
137
void wait_for_memory_release()
0 commit comments