Skip to content

Commit

Permalink
Remove remaining multiprocessing
Browse files Browse the repository at this point in the history
  • Loading branch information
cgalibern committed Mar 9, 2021
1 parent 53e1f04 commit f1e4280
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions opensvc/daemon/shared.py
Expand Up @@ -6,7 +6,6 @@
import time
import hashlib
import json
import multiprocessing
import tempfile
import shutil
from copy import deepcopy
Expand All @@ -28,31 +27,6 @@
from core.comm import Crypt
from .events import EVENTS

try:
# with python3, select the forkserver method beacuse the
# default fork method is unsafe from the daemon.
MP = multiprocessing.get_context("forkserver")
MP.set_forkserver_preload([
"opensvc.core.comm",
"opensvc.core.contexts",
"opensvc.foreign.h2",
"opensvc.foreign.hyper",
"opensvc.foreign.jsonpath_ng.ext",
"opensvc.utilities.forkserver",
"opensvc.utilities.converters",
"opensvc.utilities.naming",
"opensvc.utilities.optparser",
"opensvc.utilities.render",
"opensvc.utilities.cache",
"opensvc.utilities.lock",
"opensvc.utilities.files",
"opensvc.utilities.proc",
"opensvc.utilities.string",
])
except (ImportError, AttributeError):
# on python2, the only method is spawn, which is slow but
# safe.
MP = multiprocessing

class OsvcJournaledData(JournaledData):
def __init__(self):
Expand Down

0 comments on commit f1e4280

Please sign in to comment.