Skip to content

Commit b2d02f2

Browse files
committed
test
1 parent 7345669 commit b2d02f2

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/geode/basic/database.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,10 @@ namespace geode
6262
Logger::debug( count_, " -> ", "~Storage" );
6363
terminate_storage();
6464
std::unique_lock< std::mutex > locking{ lock_ };
65-
do
66-
{
65+
condition_.wait( locking, [this] {
6766
clean_queue();
68-
69-
} while( !condition_.wait_for(
70-
locking, std::chrono::milliseconds( 1 ), [this] {
71-
return queue_.empty();
72-
} ) );
67+
return queue_.empty();
68+
} );
7369
Logger::debug( count_, " -> ", "~Storage end" );
7470
}
7571

@@ -185,8 +181,8 @@ namespace geode
185181
}
186182
Logger::debug( count_, " -> ", "wait out + ", queue_.size(),
187183
" ", oss.str() );
188-
locking.unlock();
189184
condition_.notify_all();
185+
locking.unlock();
190186
} ) );
191187
}
192188

0 commit comments

Comments
 (0)