Doesn't work on Windows
I tried this tool on Windows and got the following stack trace:
Traceback (most recent call last):
File "c:\home\bin\anaconda2\envs\py3\lib\runpy.py", line 184, in run_module_as_main
"main", mod_spec)
File "c:\home\bin\anaconda2\envs\py3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\home\bin\Anaconda2\envs\py3\Scripts\run_lambda.exe_main.py", line 9, in
Seems to be related to https://github.com/natekupp/ffx/issues/17, which unfortunately was closed without being addressed.
As far as I can see, the multiprocessing library is the only way I can think to support Windows, while retaining timeout functionality. Unfortunately, this has some downsides:
- Much harder to estimate memory usage of calls
- Additional overhead of spawning a new process for each call. This could slow down a large suite of unit tests
- Running the lambda function in a separate process would have some noticeable repercussions (e.g. updates to global variables inside the handler function would have no effect from the parent process's perspective)
That said, I may be missing something. If you have any other suggestions for how to make run_lambda Windows-compatible, I would be happy to hear them.