'Start the current SAMP Hub instance and create the lock file. Hub
start-up can be blocking or non blocking depending on the ``wait``
parameter.
Parameters
wait : bool
If `True` then the Hub process is joined with the caller, blocking
the code flow. Usually `True` option is used to run a stand-alone
Hub in an executable script. If `False` (default), then the Hub
process runs in a separated thread. `False` is usually used in a
Python shell.'

def start(self, wait=False):

    if self._is_running:
        raise SAMPHubError(u'Hub    is    already    running')
    if (self._lockfile is not None):
        raise SAMPHubError(u'Hub    is    not    running    but    lockfile    is    set')
    if self._web_profile:
        self._start_web_profile_server()
    self._start_standard_server()
    self._lockfile = create_lock_file(lockfilename=self._customlockfilename, mode=self._mode, hub_id=self.id, hub_params=self.params)
    self._update_last_activity_time()
    self._setup_hub_as_client()
    self._start_threads()
    log.info(u'Hub    started')
    if (wait and self._is_running):
        self._thread_run.join()
        self._thread_run = None
