OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-cogutil commits / 4cedd64

Revert the agggresive use in wait in stop_writers
4cedd64bff2cce8fad2316dab70032aa5183bc0d
by Linas Vepstas <linasvepstas@gmail.com> · 2025-12-07T03:31:35.000Z

Changed files (2) +2 -8

opencog/util/async_buffer.h +1 -4
……@@ -335,10 +335,7 @@ void async_buffer<Writer, Element>::stop_writer_threads()
335335
336336 // Wait until the writer threads are (mostly) done.
337337 while (0 < _pending)
338 {
339 unsigned long pend = _pending.load();
340 if (pend > 0) _pending.wait(pend);
341 }
338 std::this_thread::sleep_for(std::chrono::milliseconds(1));
342339
343340 // Now tell all the threads that they are done.
344341 // I.e. cancel all the threads.
opencog/util/async_method_caller.h +1 -4
……@@ -255,10 +255,7 @@ void async_caller<Writer, Element>::stop_writer_threads()
255255
256256 // Wait until the writer threads are (mostly) done.
257257 while (0 < _pending)
258 {
259 unsigned long pend = _pending.load();
260 if (pend > 0) _pending.wait(pend);
261 }
258 std::this_thread::sleep_for(std::chrono::milliseconds(1));
262259
263260 // Now tell all the threads that they are done.
264261 // I.e. cancel all the threads.