_multiprocessing.SemLock is not implemented when running on AWS Lambda

前端 未结 5 1754
Happy的楠姐
Happy的楠姐 2020-12-13 19:59

I have a short code that uses the multiprocessing package and works fine on my local machine.

When I uploaded to AWS Lambda and run there,

5条回答
  •  别那么骄傲
    2020-12-13 20:45

    multiprocessing.Pool does not seem to be supported natively (because of the issue with SemLock), but multiprocessing.Process, multiprocessing.Queue, multiprocessing.Pipe etc work properly in AWSLambda.

    That should allow you to build a workaround solution by manually creating/forking processes and using a multiprocessing.Pipe for communication between the parent and child processes. Hope that helps

提交回复
热议问题