• topjohnwu's avatar
    Simplify su_info cache · f0533fca
    topjohnwu authored
    The previous implementation is great if multiple different requesters call su rapidly in a very short period of time, however in the real world this is nearly impossible to happen. This comes with quite a big overhead, since it requires two lists and also an everlasting background thread to constantly maintain the lists.
    
    The new implementation will spawn a collector thread for each cache miss, and the thread will terminate itself once the data is invalidated.
    f0533fca
su.h 1.63 KB