Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Streamers from Threads to Processes #13

Merged
merged 42 commits into from
Apr 21, 2021
Merged

Conversation

calum-chamberlain
Copy link
Member

I ran into some issues when running multiple RealTimeTribes with many templates that data would appear gappy from seedlink clients. I suspect that this was due to the MainProcess hogging the thread-time and not allowing the Streamer any of the Thread.

To get around this I have migrated the Streamers to Processes, with associated Queues for communication. This has been quite complicated!

I'm running a longer-term test with the same settings that resulted in the issue to see if this crops up again...

@calum-chamberlain
Copy link
Member Author

calum-chamberlain commented Apr 19, 2021

At the moment multiprocessing is not working on Windows or MacOS, I think because the Streamer classes are not pickleable, and Windows uses a different multiprocessing process instantiation. For now I have set it so that on Windows threading is used, and everywhere else, multiprocessing is used.

This may mean that Windows and MacOS users will run in to rate-limitations and gaps in data. If anyone on windows finds this PR in the future, this might be why!

@calum-chamberlain calum-chamberlain merged commit 1101a79 into master Apr 21, 2021
@calum-chamberlain calum-chamberlain deleted the streamer-process branch April 21, 2021 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant