Implement ModuleThread and make it work