ExperimentManager.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:experiment-manager 作者: softfire-eu 项目源码 文件源码
def start_app():
    """
        Start the ExperimentManager as application
    """
    global executor, threads
    threads.append(executor.submit(api.start_listening))
    config_t = configuration.init_sys()
    cancel = False
    while True:
        for t in threads:
            try:
                if not cancel:
                    t.result(timeout=3)
                else:
                    if t.running():
                        t.cancel()
            except TimeoutError:
                continue
            except KeyboardInterrupt:
                logger.info("received ctrl-c, shutting down...")
                cancel = True
                if get_config('database', 'drop_on_exit', False).lower() == 'true':
                    drop_tables()
                configuration.stop.set()
                config_t.join()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号