bug in decreasing allowableThreads
Nobody has claimed this yet.
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
Decreasing allowableThreads seems to take a full cycle before taking effect. I don't think this behavior is documented, and could potentially be detrimental:
```m2
i1 : allowableThreads = 8;
i2 : elapsedTime scan(apply(10, i -> schedule(() -> sleep 1)), taskResult)
-- 2.00075s elapsed
i3 : allowableThreads = 4;
i4 : elapsedTime scan(apply(10, i -> schedule(() -> sleep 1)), taskResult)
-- 2.00046s elapsed
i5 : elapsedTime scan(apply(10, i -> schedule(() -> sleep 1)), taskResult)
-- 4.00064s elapsed
```
Notice that the second time around, the correct number of threads were used, hence the total time was doubled. This doesn't seem to happen when increasing allowableThreads.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the timing sequence using allowableThreads, schedule, sleep, and taskResult, first confirming the delayed effect when decreasing the limit. Then locate the implementation of allowableThreads and trace how changes are applied across scheduled work. Done means the observed behavior is corrected or its intended semantics are made explicit, with the reproduction covered by a suitable regression check.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100