Set default threading state for Client downloads - #3
Open
calum-chamberlain wants to merge 1 commit into
Open
Conversation
staylorofford
approved these changes
Apr 14, 2026
staylorofford
left a comment
There was a problem hiding this comment.
This is a sensible change I also desire.
I see no issue with the edits of @calum-chamberlain.
GeoNet may want to consider adding documentation for max_threads in the functions where it is called, as otherwise it is only documented in the code under the init function and tangentially within the get_events and get_waveforms functions themselves.
|
@pasansherath or @Thomas-Benson give it a try and give it a tick ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To minimise the need for different argument calls compared to obspy's FDSN client, it would help to set a default state for threading at instantiation. This PR adds a
max_threadsvalue to theClientobject which can later be overloaded by individual method calls, but if themax_threadsis not set for an individual method call, it defaults to theClient's preset default. In this way you could just change the instantiation of the client compared to obspy's FDSN client without changing any other code and still make use of threading, e.g.: