[PATCH v3 5/8] Introduce run_on_main_thread
Tom Tromey
tom@tromey.com
Thu May 30 13:20:00 GMT 2019
Pedro> Can Python's gdb.post_event be built on top of this?
Pedro> It would fix that nasty "atomically enough" race in gdbpy_run_events,
Pedro> I guess.
Yes, and actually I wrote a patch to do this once, but I dropped it from
this series because it was unrelated.
>> + for (auto &item : local)
>> + item ();
Pedro> I'd think this should swallow errors when calling
Pedro> each item, instead of letting an exception escape and
Pedro> discard all other items, since each item call should be
Pedro> in principle logically unrelated?
Pedro> Maybe we could unit test this code.
I wasn't sure how. But for this maybe the callback should be noexcept.
Tom
More information about the Gdb-patches
mailing list