cms::with_active put its settings in place of the active settings on
its thread, but cms::working() still read the process-wide working
settings. Code inside with_active could therefore read active settings
from one context and working settings from another, and a set_active
on another thread changed the working half while the scope ran.
Inside with_active, working() now gives the working settings of the
context it was given: the ones for_document put a document's profiles
in place of, else that context itself. use_document_profiles and
for_document still read the process working settings, because they
install or keep process-wide contexts. Outside with_active nothing
changes. The app calls with_active only with for_document contexts
(canvas panes and the color mode change on open), whose working
settings are the process ones, so the app reads the same working
settings as before.
scripts/ci-clear-rolling-cache.py:
- The 160-minute wait is timed from the cache warm leg's start, not from
the script's start. The clear job starts with the run, and the leg
starts after gate / select legs and a free runner. The job's timeout
goes from 170 to 200 minutes to leave room for that delay.
- The leg counts as saving when its Post Setup step (the gate-setup
action's cache save) starts, not when any Post step starts. A leg that
ends canceled or failed before that step succeeds deletes nothing and
exits 1, as a leg that failed before its save already did.
- actions/caches is read one page at a time, sorted by creation, until a
page holds fewer than 100 entries.
scripts/ci-clear-rolling-cache-tests.py checks the script with recorded
API answers, and Nightly check runs it when either file changes.
many_by_block_looks_import_in_linear_time and
many_paper_layouts_are_read_in_linear_time checked for quadratic work by
timing the import (under 4 and 5 seconds), so a slow machine could fail
them and a regression that stayed under the bound passed. They now count
the work in test builds:
- the names `unique` tries for a new symbol: 4,000 symbols named by one
block try fewer than 8,000 names (8,002,000 without the per-label
suffix memo);
- the layout names the paper-layout de-duplication compares: 10,000
layouts compare at most 10,000 (49,995,000 with a list in place of the
set).
The counters are thread-local cells under cfg(test); release builds do
not count.
The plug-in store turn, the Data Recovery area hold, the script grants
lock and the hang report file each released their file lock only by
closing the file. The lock stays held while any copy of the handle is
open, and a child process that any thread starts holds a copy until it
runs its program. While one was starting, the next turn on the plug-in
store waited, an app found its own recovery area busy, a grants change
timed out, and the next launch left a hang report alone.
Each holder now unlocks the file when it is dropped, as #9837 does for
the nightly session and the GPU start file. The engine's three locks
share one type, `store::LockedFile`. A left hang report that a launch
locks to read is held the same way.
Each new test keeps a copy of the handle open, drops the holder and
takes the lock again.