• Philip Withnall's avatar
    gio: Drop redundant g_source_is_destroyed() calls · 4091b2d1
    Philip Withnall authored
    These calls cause race warnings from tsan, but are not a thread safety
    problem, because we can only ever observe single bit changes: all
    modifications to the GSource.flags field are done with a lock held; all
    reads are of independent fields, so no intermediate state can ever be
    observed. This assumes that a non-atomic read will consistently give us
    an old value or a new value.
    In any case, these g_source_is_destroyed() calls can happen from any
    thread, and the state could be changed from another thread immediately
    after the call returns; so the checks are pointless. In addition,
    calling g_source_set_ready_time() or g_source_destroy() on a destroyed
    source is not a problem.
gsubprocess.c 56.4 KB