• zhaozhao.zz's avatar
    Modules: make unloading module more safe · c74398e1
    zhaozhao.zz authored
    As we know if a module exports module-side data types,
    unload it is not allowed. This rule is the same with
    blocked clients in module, because we use background
    threads to implement module blocked clients, and it's
    not safe to unload a module if there are background
    threads running. So it's necessary to check if any
    blocked clients running in this module when unload it.
    
    Moreover, after that we can ensure that if no modules,
    then no module blocked clients even module unloaded.
    So, we can call moduleHandleBlockedClients only when
    we have installed modules.
    c74398e1
server.c 185 KB