Unverified Commit 3ae23f9e authored by Noir's avatar Noir Committed by GitHub

Merge pull request #1375

Fix "mutex destroyed while busy" error on MSVC
parents a1f4a297 51ad5c1b
...@@ -227,6 +227,7 @@ caf_add_component( ...@@ -227,6 +227,7 @@ caf_add_component(
actor_registry actor_registry
actor_system_config actor_system_config
actor_termination actor_termination
async.blocking_consumer
async.blocking_producer async.blocking_producer
async.consumer_adapter async.consumer_adapter
async.producer_adapter async.producer_adapter
...@@ -381,8 +382,3 @@ caf_add_component( ...@@ -381,8 +382,3 @@ caf_add_component(
if(CAF_ENABLE_TESTING AND CAF_ENABLE_EXCEPTIONS) if(CAF_ENABLE_TESTING AND CAF_ENABLE_EXCEPTIONS)
caf_add_test_suites(caf-core-test custom_exception_handler) caf_add_test_suites(caf-core-test custom_exception_handler)
endif() endif()
# TODO: see https://github.com/actor-framework/actor-framework/issues/1371.
if(NOT MSVC)
caf_add_test_suites(caf-core-test async.blocking_consumer)
endif()
...@@ -45,6 +45,7 @@ public: ...@@ -45,6 +45,7 @@ public:
return read_result::try_again_later; return read_result::try_again_later;
} }
auto [again, n] = buf_->pull_unsafe(guard, policy, 1u, *this); auto [again, n] = buf_->pull_unsafe(guard, policy, 1u, *this);
guard.unlock();
if (!again) { if (!again) {
buf_ = nullptr; buf_ = nullptr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment