MXS-2008 Provide single entrypoint for initializing maxbase
Everything of maxbase can now be initialized by a call to maxbase_init(); (from a C-program) or maxbase::init(); from a C++-program and finalized with calls to either maxbase_finish() or maxbase::finish(). Creating an instance maxbase::MaxBase will take care of both operations.
This commit is contained in:
@ -13,7 +13,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <maxbase/assert.h>
|
||||
#include <maxbase/log.hh>
|
||||
#include <maxbase/maxbase.hh>
|
||||
#include <maxbase/worker.hh>
|
||||
|
||||
using namespace maxbase;
|
||||
@ -123,10 +123,7 @@ int run()
|
||||
|
||||
int main()
|
||||
{
|
||||
mxb::Log log(MXB_LOG_TARGET_STDOUT);
|
||||
|
||||
maxbase::MessageQueue::init();
|
||||
maxbase::Worker::init();
|
||||
mxb::MaxBase mxb(MXB_LOG_TARGET_STDOUT);
|
||||
|
||||
return run();
|
||||
}
|
||||
|
Reference in New Issue
Block a user