per-module per-thread constructors and destructors