-
With version 3 i can use: from multiprocessing import get_context executor = ProcessPoolExecutor(max_instance=4, pool_kwargs={"mp_context": get_context("spawn")} but how do this on version 4.0.0 on linux, i want to make sure multiprocessing always use spawn and not fork |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
APScheduler 4 doesn't use |
Beta Was this translation helpful? Give feedback.
-
Hi @agronholm, can you show me example how to use apscheduler.executors.subprocess.ProcessPoolJobExecutors im trying use this code but still get error from apscheduler.executors.subprocess import ProcessPoolJobExecutors job_executors = {"custom_pool": ProcessPoolJobExecutors(max_workers=1)} def tick(): with Scheduler(data_store,event_broker, job_executors=job_executors ) as scheduler: |
Beta Was this translation helpful? Give feedback.
APScheduler 4 doesn't use
multiprocessing
at all. It uses AnyIO'sto_process.run_sync()
method which never usesfork()
anyway.