コード例 #1
0
 def threaded_init(self):
     log("threaded_init() start")
     sleep(0.1)
     from xpra.platform import threaded_server_init
     threaded_server_init()
     for c in SERVER_BASES:
         if c != ServerCore:
             c.threaded_setup(self)
     log("threaded_init() end")
コード例 #2
0
ファイル: server_base.py プロジェクト: DiGuoZhiMeng/Xpra
 def threaded_init(self):
     log("threaded_init() start")
     from xpra.platform import threaded_server_init
     threaded_server_init()
     for c in SERVER_BASES:
         if c != ServerCore:
             try:
                 c.threaded_setup(self)
             except Exception:
                 log.error("Error during threaded setup of %s",
                           c,
                           exc_info=True)
     #populate the platform info cache:
     from xpra.version_util import get_platform_info
     get_platform_info()
     log("threaded_init() end")
コード例 #3
0
    def test_all(self):
        threaded_server_init()
        with program_context() as f:
            assert repr(f)

        #this doesn't actually exercise more code,
        #as the attributes are initialized once per process...
        with program_context("prg") as f:
            assert repr(f)

        with program_context(None, "app") as f:
            assert repr(f)

        with program_context("prg", "app") as f:
            assert repr(f)
            assert get_application_name() == "app"
            assert get_prgname() == "prg"
コード例 #4
0
ファイル: server_base.py プロジェクト: gitmirrors2/xpra
 def threaded_init(self):
     log("threaded_init() start")
     from xpra.platform import threaded_server_init
     threaded_server_init()
     for c in SERVER_BASES:
         if c != ServerCore:
             try:
                 c.threaded_setup(self)
             except Exception:
                 log.error("Error during threaded setup of %s",
                           c,
                           exc_info=True)
     #populate the platform info cache:
     from xpra.version_util import get_platform_info
     get_platform_info()
     with self.init_thread_lock:
         for cb in self.init_thread_callbacks:
             try:
                 cb()
             except Exception as e:
                 log("threaded_init()", exc_info=True)
                 log.error("Error in initialization thread callback %s", cb)
                 log.error(" %s", e)
     log("threaded_init() end")