lock mutex when add module
invoke __clean__ when delete module