![]() I tested the code I quoted using Python 3.10.7 and Jupyter Lab 3.4.8 on macOS 12.6 on both an M1 Mac and an x86 Mac. This may be caused by changes to the multiprocessing module that have taken effect since others tested it – in particular, the switch to the ‘spawn’ start method implemented in Python 3.8. I tried this code and am getting an error. Yet, while the first ‘long-running’ cell keeps running, you are able to run the other ‘normal’ cells. The output from the first cell stays isolated in the first cell as it continues to run and doesn’t pollute elsewhere. ![]() ![]() This is working in my tests in the classic notebook interface and JupyterLab. ![]() Multiprocessing.Process(target=network_call).start() Better approach to try, running the long running cell in a multiprocessing process, see Python 3 Module of the Week: multiprocessing – Manage processes like threads.įollowing your posted example, you’d run: # Long running cell ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |