Beispiel #1
0
 def __init__(self, rtab, parent=None):
     super(CmdController, self).__init__(rtab, parent)
     self.ufc = 0
     self.msgos = {}
     self.fetchers = {}
     self.trunner = quamash.QThreadExecutor()
     return
Beispiel #2
0
 def __init__(self, parent=None):
     super(ReqThread, self).__init__(parent)
     self._req_queue = list()
     self._req_map = dict()
     self._res_map = dict()
     self._reqid = 0
     self._sess = requests.Session()
     self._texer = quamash.QThreadExecutor(max_workers=1)
     return
Beispiel #3
0
    async def _show_manual_install_dialog(self, contents):

        from skymodman.interface.dialogs.manual_install_dialog import ManualInstallDialog

        self.logger << "creating manual install dialog"
        with quamash.QThreadExecutor(1) as ex:
            mi_dialog = ManualInstallDialog(contents)
            mi_dialog.show()
            f = asyncio.get_event_loop().run_in_executor(ex, mi_dialog.exec_)
            await f

        del ManualInstallDialog
Beispiel #4
0
    async def run_fomod_installer(self, tmpdir):
        """
        Create and execute the Guided Fomod Installer, using the
        fomod config info loaded by `installer`; ``installer.has_fomod``
        must return True for this method to run.


        :param tmpdir: temporary directory where the files necessary for
            running the installer (and only those files) will be
            extracted. After the install, the folder and its contents
            will be deleted automatically.
        """
        from skymodman.interface.dialogs.fomod_installer_wizard import FomodInstaller

        # split the installer into a separate thread.
        with quamash.QThreadExecutor(1) as ex:
            wizard = FomodInstaller(self.installer, tmpdir)
            wizard.show()
            f = asyncio.get_event_loop().run_in_executor(ex, wizard.exec_)
            await f

        del FomodInstaller
Beispiel #5
0
def executor(request):
    exe = quamash.QThreadExecutor(5)
    request.addfinalizer(exe.shutdown)
    return exe
Beispiel #6
0
def shutdown_executor():
    exe = quamash.QThreadExecutor(5)
    exe.shutdown()
    return exe