I have some code with the following structure:
- import modules
- header guard:
- read some files
- declare functions used by all processes
- header guard:
- declare functions used by only main thread
- create worker processes
- main algorithm using main processes
The problem is that the 'read some files' section of the code cannot be indented (the file gets read by another program which I don't have control over), meaning I cannot put it inside a header guard. Does anyone have any suggestions on how I can still make this multiprocessing? Any help would be greatly appreciated