diff options
-rw-r--r-- | core/modules.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/modules.cpp b/core/modules.cpp index 5b5186b..0246b40 100644 --- a/core/modules.cpp +++ b/core/modules.cpp @@ -58,8 +58,13 @@ void run_plugins() std::list<plugin*>::iterator end = plugins.end(); for(std::list<plugin*>::iterator i = plugins.begin(); i != end; ++i) { - (*i)->get_exported_functions()->Load(&pluglink); - (*i)->get_exported_functions()->OnModulesLoaded(); + boost::thread *thr; + thr = new boost::thread(boost::bind((*i)->get_exported_functions()->Load, &pluglink)); + thr->timed_join(boost::posix_time::seconds(10)); + delete thr; + thr = new boost::thread(boost::bind((*i)->get_exported_functions()->OnModulesLoaded)); + thr->timed_join(boost::posix_time::seconds(15)); + delete thr; } } } |