Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/libsrc++/EventWriterV4.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ namespace evio {
*/
FileCloserV4(int poolSize) {
// Create a work object to keep the io_context busy
boost::asio::io_context::work work(ioContext);
auto workGuard = boost::asio::make_work_guard(ioContext);
// boost::asio::io_context::work work(ioContext);

// Add multiple threads to pool
for (int i = 0; i < poolSize; ++i) {
Expand All @@ -103,7 +104,8 @@ namespace evio {
*/
void closeAsyncFile(std::shared_ptr<std::fstream> & afc,
std::shared_ptr<std::future<void>> future) {
ioContext.post([=]() {
boost::asio::post(ioContext, [=]() {
// ioContext.post([=]() {
try {
// There may be a simultaneous write in progress,
// wait for it to finish.
Expand Down