Thread safe plugin system 

Used mutexes to serialize access to dlopen and protect data structures used in the plugin system