trace.ts ×2

Frontier kind: Code frontier

unlabeled · c_8a71b124b5f0

408 tests · 5115 LOC · 31 files · introduces 0 tests · 17 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
2 ranges17 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
659 ranges5115 lines · 31 files · Browse complete extent
All tests (intent)
408 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 17 introduced LOC across 2 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/base/test/common/virtualScheduling/trace.ts 17 introduced LOC · 2 ranges

Open complete file

143 */
144 runAsHandler<T>(t: Trace, fn: () => T, opts: RunAsHandlerOptions): T {
145 > if (this._isHandlerRunning) { trace.ts
146 throw new Error(
147 `runAsHandler: re-entrant invocation. ` +
149 );
150 }
151 > const prev = this._current; trace.ts
152 > const next: Frame = { trace: t, prev };
153 > this._current = next;
154 > this._isHandlerRunning = true;
155 > try {
156 > return fn();
157 > } finally {
158 > this._isHandlerRunning = false;
159 > opts.afterMicrotaskClosure(() => {
160 > // Identity guard: another handler may have run between us
161 > // queuing this reset and it firing. Each runAsHandler mints
162 > // a fresh frame, so reference-equality detects staleness.
163 > if (this._current === next) { this._current = prev; }
164 > });
165 > }
166 > }
167
168 _resetForTesting(): void {