Mir

Code review comment for lp:~raof/mir/provide-event-fd

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

267 + dispatcher{std::shared_ptr<md::MultiplexingDispatchable>(new md::MultiplexingDispatchable{std::dynamic_pointer_cast<md::Dispatchable>(channel)})},

Why not std::make_shared?

286 + if (eventloop) abort();

It would be helpful to the poor users if we printed an informative error message before we abort.

755 + std::thread::id terminate_one_thread()

I think there is a potential race here:

T1: calls terminate_one_thread(), T2: calls terminate_one_thread()
A thread terminates, sets terminating_thread_id
Another thread terminates, sets terminating_thread_id, overwriting previous value
T1 wakes up, finds a valid terminating_thread_id, continues and clears terminating_thread_id
T2 wakes up, finds a cleared terminating_thread_id and blocks for the remainder of 60s timeout

review: Needs Fixing

« Back to merge proposal