Commit 3e6cd18
committed
Reset concurrency to the initial default by setting 0 or nil
`Vips.concurrency_set(0)` suggests it'll set concurrency back to the
default value, but it does nothing if concurrency is already set, which
is always true because Vips.init has already configured thread pools.
The result is that if you set concurrency to any value, setting it to
zero will leave that value in place.
This reads the default concurrency immediately after Vips.init so we
can make good on having `concurrency_set 0` reset to default. Also
allows setting `nil` to reset to default.
Note that setting concurrency does not reconfigure existing thread
pools. It affects thread pools spawned for future operations.1 parent 53d279b commit 3e6cd18
3 files changed
+51
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
629 | 633 | | |
630 | 634 | | |
631 | 635 | | |
| |||
663 | 667 | | |
664 | 668 | | |
665 | 669 | | |
666 | | - | |
667 | | - | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
668 | 683 | | |
| 684 | + | |
669 | 685 | | |
| 686 | + | |
670 | 687 | | |
671 | 688 | | |
672 | 689 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
1 | 9 | | |
2 | 10 | | |
3 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
5 | 13 | | |
6 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
7 | 30 | | |
8 | 31 | | |
9 | 32 | | |
| |||
0 commit comments