Skip to content

Commit

Permalink
Restrict thread.hw_concurrency values; mention deterministic profile
Browse files Browse the repository at this point in the history
  • Loading branch information
abrown committed Jan 11, 2024
1 parent 4c14c5a commit 1a3a7c3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion design/mvp/CanonicalABI.md
Original file line number Diff line number Diff line change
Expand Up @@ -1743,8 +1743,16 @@ validation specifies:

Calling `$f` returns the number of threads the underlying hardware can be
expected to execute concurrently. This value can be artificially limited by
engine configuration.
engine configuration and is not allowed to change over the lifetime of a
component instance.

```python
def canon_thread_hw_concurrency():
if DETERMINISTIC_PROFILE:
return 1
else:
return NUM_ALLOWED_THREADS
```

[Canonical Definitions]: Explainer.md#canonical-definitions
[`canonopt`]: Explainer.md#canonical-definitions
Expand Down

0 comments on commit 1a3a7c3

Please sign in to comment.