On 8/10/21 12:29 PM, RĂ©mi Bernon wrote:
Instead of waiting for it.
Otherwise the module may be unloaded on process shutdown while the thread is still busy processing events, causing possible invalid memory access (for instance when accessing the static pnp_devset device list).
I'm confused; how can the thread still be running during unload if we're waiting for the thread to stop?