Thread limit introspection API, part 1: API scope#213
Conversation
There was a problem hiding this comment.
I find it a bit disturbing that calling threadpoolctl.threadpool_info can temporarily mutate the libraries global state in a non-thread safe way.
The alternative would be to hardcode expected scopes in LibController for all known libraries (and return "unknown" otherwise) and only call _determine_api_scope in tests or by passing a non-default kwarg value: threadpool_ctl.threadpool_info(api_scopes="effective") (and api_scopes="expected" would be the default) for instance.
|
Another interesting finding by looking at the CI results: BLIS is |
|
I think it's useful to have it in |
|
I am fine with introducing an extra CLI flag to enable the extra inspection work. |
…ected outcomes across a variety of libraries.
|
My feeling is:
|
Fixes #211.
Add info to determine the scope of the thread-limit-setting API (thread local, process-wide, unknown). Introspecting the semantics of the thread pool are going to be a separate PR, assuming that can be done reasonably.