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:
@ -559,22 +559,6 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Initialize the worker mechanism.
|
||||
*
|
||||
* To be called once at process startup.
|
||||
*
|
||||
* @return True if the initialization succeeded, false otherwise.
|
||||
*/
|
||||
static bool init();
|
||||
|
||||
/**
|
||||
* Finalize the worker mechanism.
|
||||
*
|
||||
* To be called once at process shutdown.
|
||||
*/
|
||||
static void finish();
|
||||
|
||||
enum
|
||||
{
|
||||
MAX_EVENTS = 1000
|
||||
@ -990,6 +974,11 @@ protected:
|
||||
*/
|
||||
static void resolve_poll_error(int fd, int err, int op);
|
||||
|
||||
public:
|
||||
// TODO: Make private once all callers have beed modified.
|
||||
static bool init();
|
||||
static void finish();
|
||||
|
||||
private:
|
||||
class DelayedCall;
|
||||
friend class DelayedCall;
|
||||
|
||||
Reference in New Issue
Block a user