コード例 #1
0
  def test_process_pool_threading(self):

    from libtbx.scheduling import process_pool
    from libtbx.scheduling import thread_handler
    import threading

    creator = process_pool.creator(
      job_factory = threading.Thread,
      inq_factory = thread_handler.qfactory,
      outq_factory = thread_handler.qfactory,
      autoscaling = process_pool.constant_capacity( capacity = 1 ),
      lifecycle = process_pool.unlimited,
      )
    self.run_tests( creator = creator )
コード例 #2
0
    def test_process_pool_threading(self):

        from libtbx.scheduling import process_pool
        from libtbx.scheduling import thread_handler
        import threading

        creator = process_pool.creator(
            job_factory=threading.Thread,
            inq_factory=thread_handler.qfactory,
            outq_factory=thread_handler.qfactory,
            autoscaling=process_pool.constant_capacity(capacity=1),
            lifecycle=process_pool.unlimited,
        )
        self.run_tests(creator=creator)
コード例 #3
0
  def test_process_pool_multiprocessing(self):

    from libtbx.scheduling import process_pool
    from libtbx.scheduling import mp_handler

    creator = process_pool.creator(
      job_factory = mp_handler.stderr_capturing_process,
      inq_factory = mp_handler.fifo_qfactory,
      outq_factory = mp_handler.fifo_qfactory,
      autoscaling = process_pool.constant_capacity( capacity = 1 ),
      lifecycle = process_pool.unlimited,
      )
    import sys
    self.run_tests(
      creator = creator,
      perform_crash_test = ( sys.platform != "win32" ),
      )
コード例 #4
0
    def test_process_pool_multiprocessing(self):

        from libtbx.scheduling import process_pool
        from libtbx.scheduling import mp_handler

        creator = process_pool.creator(
            job_factory=mp_handler.stderr_capturing_process,
            inq_factory=mp_handler.fifo_qfactory,
            outq_factory=mp_handler.fifo_qfactory,
            autoscaling=process_pool.constant_capacity(capacity=1),
            lifecycle=process_pool.unlimited,
        )
        import sys
        self.run_tests(
            creator=creator,
            perform_crash_test=(sys.platform != "win32"),
        )
コード例 #5
0
ファイル: philgen.py プロジェクト: yayahjb/cctbx_project
def pool_constant_capacity(ncpus):

  from libtbx.scheduling import process_pool
  return process_pool.constant_capacity( capacity = ncpus )
コード例 #6
0
ファイル: philgen.py プロジェクト: cctbx/cctbx-playground
def pool_constant_capacity(ncpus):

  from libtbx.scheduling import process_pool
  return process_pool.constant_capacity( capacity = ncpus )