Closed HosseinSharifii closed 3 years ago
@HosseinGit Ken will do this at some stage
Ken has implemented multithreading in PyMyoVent.py but it seems to slow simulations down, possibly due to writing to disk?
Currently deactivated
I am not an expert , but It depends on how you implemented it. There are different ways out there, and I have seen that multithreading is not quite similar to multiprocessing! Multithreading mainly is used for I/O bound application like websites stuff that does not need dealing much with CPU. However, multiprocessing uses multiple memory spaces and CPU cores, which I believe is what we need in PyMyoVent. Here is an article that explains the difference: [https://blog.usejournal.com/multithreading-vs-multiprocessing-in-python-c7dc88b50b5b] I don't know how Ken has implemented this since it is not pushed back into the repository. But there is a commit in HS_growth branch that has done multiprocessing. It was tested by Hossein and seemed it was working.
Thanks @HosseinGit - very helpful.
Multi threading needs to be more structured by Hossein.