Ignore:
Timestamp:
Feb 7, 2026, 1:40:26 PM (25 hours ago)
Author:
Matthew Au-Yeung <mw2auyeu@…>
Branches:
stuck-waitfor-destruct
Parents:
c7d106a
git-author:
Matthew Au-Yeung <mw2auyeu@…> (02/07/26 13:40:05)
git-committer:
Matthew Au-Yeung <mw2auyeu@…> (02/07/26 13:40:26)
Message:

Add a generated hash to fix stuck waitfor comparing static inline mutex destructors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/thread.cfa

    rc7d106a ra9ce782  
    6161
    6262        doregister(curr_cluster, this);
    63         monitors{ &self_mon_p, 1, (fptr_t)0 };
     63        monitors{ &self_mon_p, 1, (fptr_t)0, (func_id_t)0 };
    6464}
    6565
     
    9393    | { EHM_DEFAULT_VTABLE(ThreadCancelled(T)); })
    9494void ?{}( thread_dtor_guard_t & this,
    95                 T & thrd, void(*cancelHandler)(ThreadCancelled(T) &)) {
     95                T & thrd, func_id_t func_id, void(*cancelHandler)(ThreadCancelled(T) &)) {
    9696        monitor$ * m = get_monitor(thrd);
    9797        thread$ * desc = get_thread(thrd);
     
    100100        void (*dtor)(T& mutex this) = ^?{};
    101101        bool join = cancelHandler != (void(*)(ThreadCancelled(T)&))0;
    102         (this.mg){&m, (void(*)())dtor, join};
     102        this.func_id = func_id;
     103        (this.mg){&m, (void(*)())dtor, func_id, join};
    103104
    104105
     
    172173        | { EHM_DEFAULT_VTABLE(ThreadCancelled(T)); })
    173174T & join( T & this ) {
    174         thread_dtor_guard_t guard = { this, defaultResumptionHandler };
     175        thread_dtor_guard_t guard = { this, (func_id_t)0, defaultResumptionHandler };
    175176        return this;
    176177}
Note: See TracChangeset for help on using the changeset viewer.