diff options
author | lloyd <[email protected]> | 2008-09-28 23:37:39 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-28 23:37:39 +0000 |
commit | ce4f262d2519324e2a5f0dd9d5b786e43c968f96 (patch) | |
tree | e4f278140be9cca7588ee273d4e59550718d4f73 /src/libstate.cpp | |
parent | a6f3801debb5239505ec2c9523a7fec5a9bbb070 (diff) |
Move Default_Mutex (now Noop_Mutex) into module
Diffstat (limited to 'src/libstate.cpp')
-rw-r--r-- | src/libstate.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstate.cpp b/src/libstate.cpp index 141e0d1ec..df9d2b519 100644 --- a/src/libstate.cpp +++ b/src/libstate.cpp @@ -228,10 +228,10 @@ void Library_State::initialize(const InitializerOptions& args, if(mutex_factory) throw Invalid_State("Library_State has already been initialized"); - if(args.thread_safe()) - mutex_factory = modules.mutex_factory(); - else - mutex_factory = new Default_Mutex_Factory; + mutex_factory = modules.mutex_factory(args.thread_safe()); + + if(!mutex_factory) + throw Invalid_State("Could not acquire a mutex module at init"); allocator_lock = get_mutex(); engine_lock = get_mutex(); |