Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardPythonmultiprocessing vs threading picklingSingle-choice MCQ

Under the 'spawn' start method, why does a worker targeting a module-level function succeed while one targeting a lambda or a locally-defined closure fails?

f = lambda x: x pickle.dumps(f) def make(): def inner(): pass return inner pickle.dumps(make())