Start the pinging coroutine using the client and event loop which was
        passed to the constructor.

        :meth:`start` always behaves as if :meth:`stop` was called right before
        it.
165876
def start(self):
        
        self.stop()
        self._task = asyncio.ensure_future(self._pinger(), loop=self._loop)
85772
def start(self, sockets=None, **kwargs):
        

        pty_stdin, pty_stdout, pty_stderr = sockets or self.sockets()
        pumps = []

        if pty_stdin and self.interactive:
            pumps.append(io.Pump(io.Stream(self.stdin), pty_stdin, wait_for_output=False))

        if pty_stdout:
            pumps.append(io.Pump(pty_stdout, io.Stream(self.stdout), propagate_close=False))

        if pty_stderr:
            pumps.append(io.Pump(pty_stderr, io.Stream(self.stderr), propagate_close=False))

        if not self._container_info()['State']['Running']:
            self.client.start(self.container, **kwargs)

        return pumps
88778
def start(self, *args, **kwargs):
        
        if args:
            LOG.debug("args: %s" % str(args))
        if kwargs:
            LOG.debug("kwargs: %s" % str(kwargs))
        try:
            self._server.start()
            self._server.proxyInit()
            return True
        except Exception as err:
            LOG.critical("Failed to start server")
            LOG.debug(str(err))
            self._server.stop()
            return False
453463
def coroutine(func):
    '''
    
    '''
    def start(*args, **kwargs):
        cr = func(*args, **kwargs)
        cr.next()
        return cr
    return start
445266
def _start_loop(self):
        """"""
        # Create our main loop, get our bus, and add the signal handler
        loop = GObject.MainLoop()
        bus = SystemBus()
        manager = bus.get(".NetworkManager")
        manager.onPropertiesChanged = self._vpn_signal_handler

        # Loop forever
        loop.run()
811764
def _start_server(bindaddr, port, hostname, folder):
    """"""
    import asyncio
    from .httpserver import HttpProtocol
    loop = asyncio.get_event_loop()
    coroutine = loop.create_server(lambda: HttpProtocol(hostname, folder),
                                   bindaddr,
                                   port)
    server = loop.run_until_complete(coroutine)

    print('Starting server on {}'.format(server.sockets[0].getsockname()))
    try:
        loop.run_forever()
    except KeyboardInterrupt:
        pass
860375
async def run(self):
        """"""
        logging.info('Starting message router...')

        coroutines = set()
        while True:
            coro = self._poll_channel()
            coroutines.add(coro)
            _, coroutines = await asyncio.wait(coroutines, timeout=0.1)
610592
def main(event_loop=None):
    
    context, credentials = get_context_from_cmdln(sys.argv[1:])
    log.info("Scriptworker starting up at {} UTC".format(arrow.utcnow().format()))
    cleanup(context)
    context.event_loop = event_loop or asyncio.get_event_loop()

    done = False

    async def _handle_sigterm():
        log.info("SIGTERM received; shutting down")
        nonlocal done
        done = True
        if context.running_tasks is not None:
            await context.running_tasks.cancel()

    context.event_loop.add_signal_handler(signal.SIGTERM, lambda: asyncio.ensure_future(_handle_sigterm()))

    while not done:
        try:
            context.event_loop.run_until_complete(async_main(context, credentials))
        except Exception:
            log.critical("Fatal exception", exc_info=1)
            raise
34946
def start(self, timeout=None):
        
        if self._handler_thread and self._handler_thread.isAlive():
            raise RuntimeError('Message handler thread already started')
        self._server.start(timeout)
        self.ioloop = self._server.ioloop
        if self._handler_thread:
            self._handler_thread.set_ioloop(self.ioloop)
            self._handler_thread.start(timeout)
447349
def start(self):
        
        self.thread_handler.run(target=self.start_blocking)
        self.thread_handler.start_run_loop()
436748
def start(self):
        
        self.running = True
        self.thread = threading.Thread(target=self._main_loop)
        self.thread.start()
302763
def start(**kwargs: Any) -> None:
    
    start_server(**kwargs)
    try:
        asyncio.get_event_loop().run_forever()
    except KeyboardInterrupt:
        stop_server()
238229
def start(self):
        '''
        
        '''
        self._handler = _create_handler_class(self._rules, self._always_rules)
        self._server = HTTPServer(('', self._port), self._handler)
        self._thread = Thread(target=self._server.serve_forever, daemon=True)
        self._thread.start()
        self.running = True
        return self
76586
def _start_loop(self, websocket, event_handler):
		
		log.debug('Starting websocket loop')
		while True:
			try:
				yield from asyncio.wait_for(
					self._wait_for_message(websocket, event_handler),
					timeout=self.options['timeout']
				)
			except asyncio.TimeoutError:
				yield from websocket.pong()
				log.debug("Sending heartbeat...")
				continue
423056
async def start_child():
    

    logger.info('Started to watch for code changes')

    loop = asyncio.get_event_loop()
    watcher = aionotify.Watcher()

    flags = (
        aionotify.Flags.MODIFY |
        aionotify.Flags.DELETE |
        aionotify.Flags.ATTRIB |
        aionotify.Flags.MOVED_TO |
        aionotify.Flags.MOVED_FROM |
        aionotify.Flags.CREATE |
        aionotify.Flags.DELETE_SELF |
        aionotify.Flags.MOVE_SELF
    )

    watched_dirs = list_dirs()

    for dir_name in watched_dirs:
        watcher.watch(path=dir_name, flags=flags)

    await watcher.setup(loop)

    while True:
        evt = await watcher.get_event()
        file_path = path.join(evt.alias, evt.name)

        if file_path in watched_dirs or file_path.endswith('.py'):
            await asyncio.sleep(settings.CODE_RELOAD_DEBOUNCE)
            break

    watcher.close()
    exit_for_reload()
576876
async def start_server_in_loop(runner, hostname, port, agent):
    
    await runner.setup()
    agent.web.server = aioweb.TCPSite(runner, hostname, port)
    await agent.web.server.start()
    logger.info(f"Serving on http://{hostname}:{port}/")
1049064
def start(self, *args, **kwargs):
        

        @wraps(self.callback)
        def callback():
            os.read(self.timer, 8)
            repeat = self.callback(*args, **kwargs)
            if not repeat:
                self.stop()

        spec = timerfd.itimerspec(self.interval, self.interval)
        timerfd.settime(self.timer, 0, spec)

        self.loop.remove_watcher(self.timer)
        self.loop.add_watcher(self.timer, callback)