-
Notifications
You must be signed in to change notification settings - Fork 409
subjects::synchronize lock with current_thread or immediate scheduler #491
Copy link
Copy link
Closed
Description
rxcpp::composite_subscription lifetime;
rxcpp::subjects::synchronize<int, rxcpp::identity_one_worker> sub(
rxcpp::identity_current_thread(), lifetime);
sub.get_subscriber().on_next(1);
lifetime.unsubscribe();This code locks in drain_queue
| std::unique_lock<std::mutex> guard(lock); |
because the lock in
on_next is not unlocked | std::unique_lock<std::mutex> guard(lock); |
Should it be safe to call unlock before these lines?
RxCpp/Rx/v2/src/rxcpp/subjects/rx-synchronize.hpp
Lines 91 to 92 in 7c79c18
| auto processor = coordinator.get_worker(); | |
| processor.schedule(lifetime, selectedDrain.get()); |
schedule should be thread-safe by contract if I am not mistaken.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels