Skip to content

Commit ae4c05a

Browse files
pavelsavaramaraf
andauthored
[browser][MT] pre-load threads early in dotnet.js (#98637)
Co-authored-by: Marek Fišera <[email protected]>
1 parent eeadd65 commit ae4c05a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+653
-599
lines changed

src/mono/browser/build/BrowserWasmApp.targets

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@
121121

122122
<PropertyGroup>
123123
<!-- TODO: set this from some user-facing property? -1 means use the default baked into dotnet.native.js -->
124-
<_WasmPThreadPoolSize Condition="'$(_WasmPThreadPoolSize)' == ''">-1</_WasmPThreadPoolSize>
124+
<_WasmPThreadPoolInitialSize Condition="'$(_WasmPThreadPoolInitialSize)' == ''">-1</_WasmPThreadPoolInitialSize>
125+
<_WasmPThreadPoolUnusedSize Condition="'$(_WasmPThreadPoolUnusedSize)' == ''">-1</_WasmPThreadPoolUnusedSize>
125126
</PropertyGroup>
126127

127128
<ItemGroup>
@@ -148,7 +149,8 @@
148149
NativeAssets="@(WasmNativeAsset)"
149150
DebugLevel="$(WasmDebugLevel)"
150151
IncludeThreadsWorker="$(WasmEnableThreads)"
151-
PThreadPoolSize="$(_WasmPThreadPoolSize)"
152+
PThreadPoolInitialSize="$(_WasmPThreadPoolInitialSize)"
153+
PThreadPoolUnusedSize="$(_WasmPThreadPoolUnusedSize)"
152154
UseWebcil="$(WasmEnableWebcil)"
153155
WasmIncludeFullIcuData="$(WasmIncludeFullIcuData)"
154156
WasmIcuDataFileName="$(WasmIcuDataFileName)"

src/mono/browser/runtime/assets.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
import type { AssetEntryInternal } from "./types/internal";
5+
46
import cwraps from "./cwraps";
57
import { mono_wasm_load_icu_data } from "./icu";
68
import { Module, loaderHelpers, mono_assert, runtimeHelpers } from "./globals";
79
import { mono_log_info, mono_log_debug, parseSymbolMapFile } from "./logging";
810
import { mono_wasm_load_bytes_into_heap } from "./memory";
911
import { endMeasure, MeasuredBlock, startMeasure } from "./profiler";
10-
import { AssetEntryInternal } from "./types/internal";
1112
import { AssetEntry } from "./types";
1213
import { VoidPtr } from "./types/emscripten";
1314
import { setSegmentationRulesFromJson } from "./hybrid-globalization/grapheme-segmenter";

src/mono/browser/runtime/cwraps.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ import WasmEnableThreads from "consts:wasmEnableThreads";
66
import type {
77
MonoAssembly, MonoClass,
88
MonoMethod, MonoObject,
9-
MonoType, MonoObjectRef, MonoStringRef, JSMarshalerArguments
9+
MonoType, MonoObjectRef, MonoStringRef, JSMarshalerArguments, PThreadPtr
1010
} from "./types/internal";
1111
import type { VoidPtr, CharPtrPtr, Int32Ptr, CharPtr, ManagedPointer } from "./types/emscripten";
1212
import { Module, runtimeHelpers } from "./globals";
1313
import { mono_log_error } from "./logging";
1414
import { mono_assert } from "./globals";
15-
import { PThreadPtr } from "./pthreads/shared/types";
1615

1716
type SigLine = [lazyOrSkip: boolean | (() => boolean), name: string, returnType: string | null, argTypes?: string[], opts?: any];
1817

src/mono/browser/runtime/debug.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
import BuildConfiguration from "consts:configuration";
5+
56
import { INTERNAL, Module, loaderHelpers, runtimeHelpers } from "./globals";
67
import { toBase64StringImpl } from "./base64";
78
import cwraps from "./cwraps";

src/mono/browser/runtime/diagnostics/browser/controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import { threads_c_functions as cwraps } from "../../cwraps";
77
import { INTERNAL, mono_assert } from "../../globals";
88
import { mono_log_info, mono_log_debug, mono_log_warn } from "../../logging";
99
import { withStackAlloc, getI32 } from "../../memory";
10-
import { Thread, waitForThread } from "../../pthreads/browser";
10+
import { waitForThread } from "../../pthreads";
1111
import { isDiagnosticMessage, makeDiagnosticServerControlCommand } from "../shared/controller-commands";
1212
import monoDiagnosticsMock from "consts:monoDiagnosticsMock";
13-
import { PThreadPtr } from "../../pthreads/shared/types";
13+
import { PThreadPtr, Thread } from "../../types/internal";
1414

1515
/// An object that can be used to control the diagnostic server.
1616
export interface ServerController {

src/mono/browser/runtime/diagnostics/index.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,9 @@ let diagnosticsServerEnabled = false;
3737
let diagnosticsInitialized = false;
3838

3939
export async function mono_wasm_init_diagnostics(): Promise<void> {
40-
if (diagnosticsInitialized)
41-
return;
42-
if (!WasmEnableThreads) {
43-
mono_log_warn("ignoring diagnostics options because this runtime does not support diagnostics");
44-
return;
45-
}
40+
if (!WasmEnableThreads) return;
41+
if (diagnosticsInitialized) return;
42+
4643
const options = diagnostic_options_from_environment();
4744
if (!options)
4845
return;

src/mono/browser/runtime/diagnostics/mock/environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { FilterPredicate, MockEnvironment } from "./types";
66
import Serializer from "../server_pthread/ipc-protocol/base-serializer";
77
import { CommandSetId, EventPipeCommandId, ProcessCommandId } from "../server_pthread/ipc-protocol/types";
88
import { assertNever } from "../../types/internal";
9-
import { pthread_self } from "../../pthreads/worker";
9+
import { pthread_self } from "../../pthreads";
1010
import { createPromiseController, mono_assert } from "../../globals";
1111

1212

src/mono/browser/runtime/diagnostics/server_pthread/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import WasmEnableThreads from "consts:wasmEnableThreads";
66
import monoDiagnosticsMock from "consts:monoDiagnosticsMock";
77

88
import { PromiseAndController, assertNever } from "../../types/internal";
9-
import { pthread_self } from "../../pthreads/worker";
9+
import { pthread_self } from "../../pthreads";
1010
import { createPromiseController, mono_assert } from "../../globals";
1111
import { threads_c_functions as cwraps } from "../../cwraps";
1212
import { EventPipeSessionIDImpl } from "../shared/types";

src/mono/browser/runtime/diagnostics/shared/controller-commands.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
import type { MonoThreadMessage } from "../../pthreads/shared";
5-
import { isMonoThreadMessage } from "../../pthreads/shared";
4+
import { isMonoThreadMessage } from "../../pthreads";
5+
import type { MonoThreadMessage } from "../../types/internal";
66

77
// Messages from the main thread to the diagnostic server thread
88
export interface DiagnosticMessage extends MonoThreadMessage {

src/mono/browser/runtime/dotnet.d.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,15 @@ type MonoConfig = {
189189
/**
190190
* initial number of workers to add to the emscripten pthread pool
191191
*/
192-
pthreadPoolSize?: number;
192+
pthreadPoolInitialSize?: number;
193+
/**
194+
* number of unused workers kept in the emscripten pthread pool after startup
195+
*/
196+
pthreadPoolUnusedSize?: number;
197+
/**
198+
* Delay in milliseconds before starting the finalizer thread
199+
*/
200+
finalizerThreadStartDelayMs?: number;
193201
/**
194202
* If true, a list of the methods optimized by the interpreter will be saved and used for faster startup
195203
* on future runs of the application

src/mono/browser/runtime/exports-binding.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import { mono_interp_tier_prepare_jiterpreter, mono_jiterp_free_method_data_js }
1010
import { mono_interp_jit_wasm_entry_trampoline, mono_interp_record_interp_entry } from "./jiterpreter-interp-entry";
1111
import { mono_interp_jit_wasm_jit_call_trampoline, mono_interp_invoke_wasm_jit_call_trampoline, mono_interp_flush_jitcall_queue } from "./jiterpreter-jit-call";
1212
import { mono_wasm_resolve_or_reject_promise } from "./marshal-to-js";
13-
import { mono_wasm_eventloop_has_unsettled_interop_promises } from "./pthreads/shared/eventloop";
14-
import { mono_wasm_pthread_on_pthread_attached, mono_wasm_pthread_on_pthread_unregistered, mono_wasm_pthread_on_pthread_registered, mono_wasm_pthread_set_name } from "./pthreads/worker";
13+
import { mono_wasm_eventloop_has_unsettled_interop_promises } from "./pthreads";
1514
import { mono_wasm_schedule_timer, schedule_background_exec } from "./scheduling";
1615
import { mono_wasm_asm_loaded } from "./startup";
1716
import { mono_wasm_diagnostic_server_on_server_thread_created } from "./diagnostics/server_pthread";
@@ -22,13 +21,15 @@ import { mono_wasm_profiler_leave, mono_wasm_profiler_enter } from "./profiler";
2221
import { mono_wasm_change_case, mono_wasm_change_case_invariant } from "./hybrid-globalization/change-case";
2322
import { mono_wasm_compare_string, mono_wasm_ends_with, mono_wasm_starts_with, mono_wasm_index_of } from "./hybrid-globalization/collations";
2423
import { mono_wasm_get_calendar_info } from "./hybrid-globalization/calendar";
25-
import { mono_wasm_install_js_worker_interop, mono_wasm_uninstall_js_worker_interop } from "./pthreads/shared";
2624

2725
import { mono_wasm_get_culture_info } from "./hybrid-globalization/culture-info";
2826
import { mono_wasm_get_first_day_of_week, mono_wasm_get_first_week_of_year } from "./hybrid-globalization/locales";
2927
import { mono_wasm_browser_entropy } from "./crypto";
3028
import { mono_wasm_cancel_promise } from "./cancelable-promise";
3129

30+
import { mono_wasm_pthread_on_pthread_attached, mono_wasm_pthread_on_pthread_unregistered, mono_wasm_pthread_on_pthread_registered, mono_wasm_pthread_set_name } from "./pthreads";
31+
import { mono_wasm_install_js_worker_interop, mono_wasm_uninstall_js_worker_interop } from "./pthreads";
32+
3233
// the JS methods would be visible to EMCC linker and become imports of the WASM module
3334

3435
export const mono_wasm_threads_imports = !WasmEnableThreads ? [] : [

src/mono/browser/runtime/exports-internal.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
import WasmEnableThreads from "consts:wasmEnableThreads";
5+
6+
import { MonoObjectNull, type MonoObject } from "./types/internal";
47
import cwraps, { profiler_c_functions } from "./cwraps";
58
import { mono_wasm_send_dbg_command_with_parms, mono_wasm_send_dbg_command, mono_wasm_get_dbg_command_info, mono_wasm_get_details, mono_wasm_release_object, mono_wasm_call_function_on, mono_wasm_debugger_resume, mono_wasm_detach_debugger, mono_wasm_raise_debug_event, mono_wasm_change_debugger_log_level, mono_wasm_debugger_attached } from "./debug";
69
import { http_wasm_supports_streaming_request, http_wasm_supports_streaming_response, http_wasm_create_controller, http_wasm_abort_request, http_wasm_abort_response, http_wasm_transform_stream_write, http_wasm_transform_stream_close, http_wasm_fetch, http_wasm_fetch_stream, http_wasm_fetch_bytes, http_wasm_get_response_header_names, http_wasm_get_response_header_values, http_wasm_get_response_bytes, http_wasm_get_response_length, http_wasm_get_streamed_response_bytes, http_wasm_get_response_type, http_wasm_get_response_status } from "./http";
@@ -17,16 +20,17 @@ import { loadLazyAssembly } from "./lazyLoading";
1720
import { loadSatelliteAssemblies } from "./satelliteAssemblies";
1821
import { forceDisposeProxies } from "./gc-handles";
1922
import { mono_wasm_get_func_id_to_name_mappings } from "./logging";
20-
import { MonoObject, MonoObjectNull } from "./types/internal";
2123
import { monoStringToStringUnsafe } from "./strings";
22-
import { thread_available } from "./pthreads/browser";
2324
import { mono_wasm_bind_cs_function } from "./invoke-cs";
2425

26+
import { dumpThreads, thread_available } from "./pthreads";
27+
2528
export function export_internal(): any {
2629
return {
2730
// tests
2831
mono_wasm_exit: (exit_code: number) => { Module.err("early exit " + exit_code); },
2932
forceDisposeProxies,
33+
dumpThreads: WasmEnableThreads ? dumpThreads : undefined,
3034

3135
// with mono_wasm_debugger_log and mono_wasm_trace_logger
3236
logging: undefined,
@@ -57,7 +61,7 @@ export function export_internal(): any {
5761
get_global_this,
5862
get_dotnet_instance: () => exportedRuntimeAPI,
5963
dynamic_import,
60-
thread_available,
64+
thread_available: WasmEnableThreads ? thread_available : undefined,
6165
mono_wasm_bind_cs_function,
6266

6367
// BrowserWebSocket

src/mono/browser/runtime/exports.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { mono_wasm_stringify_as_error_with_stack } from "./logging";
2222
import { instantiate_asset, instantiate_symbols_asset, instantiate_segmentation_rules_asset } from "./assets";
2323
import { jiterpreter_dump_stats } from "./jiterpreter";
2424
import { forceDisposeProxies } from "./gc-handles";
25-
import { dumpThreads } from "./pthreads/browser";
25+
import { dumpThreads } from "./pthreads";
2626

2727
export let runtimeList: RuntimeList;
2828

src/mono/browser/runtime/interp-pgo.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@ export async function getCacheKey(prefix: string): Promise<string | null> {
197197
delete inputs.interopCleanupOnExit;
198198
delete inputs.dumpThreadsOnNonZeroExit;
199199
delete inputs.logExitCode;
200-
delete inputs.pthreadPoolSize;
200+
delete inputs.pthreadPoolInitialSize;
201+
delete inputs.pthreadPoolUnusedSize;
202+
delete inputs.finalizerThreadStartDelayMs;
201203
delete inputs.asyncFlushOnExit;
202204
delete inputs.remoteSources;
203205
delete inputs.ignorePdbLoadErrors;

src/mono/browser/runtime/loader/assets.ts

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import WasmEnableThreads from "consts:wasmEnableThreads";
55

6-
import type { AssetEntryInternal, PromiseAndController } from "../types/internal";
6+
import { PThreadPtrNull, type AssetEntryInternal, type PThreadWorker, type PromiseAndController } from "../types/internal";
77
import type { AssetBehaviors, AssetEntry, LoadingResource, ResourceList, SingleAssetBehaviors as SingleAssetBehaviors, WebAssemblyBootResourceType } from "../types";
88
import { ENVIRONMENT_IS_NODE, ENVIRONMENT_IS_SHELL, ENVIRONMENT_IS_WEB, loaderHelpers, mono_assert, runtimeHelpers } from "./globals";
99
import { createPromiseController } from "./promise-controller";
@@ -20,6 +20,9 @@ let parallel_count = 0;
2020
const assetsToLoad: AssetEntryInternal[] = [];
2121
const singleAssets: Map<string, AssetEntryInternal> = new Map();
2222

23+
// A duplicate in pthreads/shared.ts
24+
const worker_empty_prefix = " - ";
25+
2326
const jsRuntimeModulesAssetTypes: {
2427
[k: string]: boolean
2528
} = {
@@ -733,4 +736,24 @@ export async function streamingCompileWasm() {
733736
catch (err) {
734737
loaderHelpers.wasmCompilePromise.promise_control.reject(err);
735738
}
736-
}
739+
}
740+
741+
export function preloadWorkers() {
742+
if (!WasmEnableThreads) return;
743+
const jsModuleWorker = resolve_single_asset_path("js-module-threads");
744+
for (let i = 0; i < loaderHelpers.config.pthreadPoolInitialSize!; i++) {
745+
const workerNumber = loaderHelpers.workerNextNumber++;
746+
const worker: Partial<PThreadWorker> = new Worker(jsModuleWorker.resolvedUrl!, {
747+
name: "dotnet-worker-" + workerNumber.toString().padStart(3, "0"),
748+
});
749+
worker.info = {
750+
workerNumber,
751+
pthreadId: PThreadPtrNull,
752+
reuseCount: 0,
753+
updateCount: 0,
754+
threadPrefix: worker_empty_prefix,
755+
threadName: "emscripten-pool",
756+
} as any;
757+
loaderHelpers.loadingWorkers.push(worker as any);
758+
}
759+
}

src/mono/browser/runtime/loader/config.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,15 @@ export function normalizeConfig() {
187187
config.cachedResourcesPurgeDelay = 10000;
188188
}
189189

190-
if (WasmEnableThreads && !Number.isInteger(config.pthreadPoolSize)) {
191-
// ActiveIssue https://github.com/dotnet/runtime/issues/75602
192-
config.pthreadPoolSize = 7;
190+
// ActiveIssue https://github.com/dotnet/runtime/issues/75602
191+
if (WasmEnableThreads && !Number.isInteger(config.pthreadPoolInitialSize)) {
192+
config.pthreadPoolInitialSize = 7;
193+
}
194+
if (WasmEnableThreads && !Number.isInteger(config.pthreadPoolUnusedSize)) {
195+
config.pthreadPoolUnusedSize = 3;
196+
}
197+
if (WasmEnableThreads && !Number.isInteger(config.finalizerThreadStartDelayMs)) {
198+
config.finalizerThreadStartDelayMs = 200;
193199
}
194200

195201
// this is how long the Mono GC will try to wait for all threads to be suspended before it gives up and aborts the process

src/mono/browser/runtime/loader/globals.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ export function setLoaderGlobals(
9292
loadedFiles: [],
9393
loadedAssemblies: [],
9494
libraryInitializers: [],
95+
loadingWorkers: [],
96+
workerNextNumber: 1,
9597
actual_downloaded_assets_count: 0,
9698
actual_instantiated_assets_count: 0,
9799
expected_downloaded_assets_count: 0,

src/mono/browser/runtime/loader/run.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { ENVIRONMENT_IS_WEB, ENVIRONMENT_IS_WORKER, emscriptenModule, exportedRu
1010
import { deep_merge_config, deep_merge_module, mono_wasm_load_config } from "./config";
1111
import { installUnhandledErrorHandler, mono_exit, registerEmscriptenExitHandlers } from "./exit";
1212
import { setup_proxy_console, mono_log_info, mono_log_debug } from "./logging";
13-
import { mono_download_assets, prepareAssets, prepareAssetsWorker, resolve_single_asset_path, streamingCompileWasm } from "./assets";
13+
import { mono_download_assets, preloadWorkers, prepareAssets, prepareAssetsWorker, resolve_single_asset_path, streamingCompileWasm } from "./assets";
1414
import { detect_features_and_polyfill } from "./polyfills";
1515
import { runtimeHelpers, loaderHelpers } from "./globals";
1616
import { init_globalization } from "./icu";
@@ -487,6 +487,7 @@ async function createEmscriptenMain(): Promise<RuntimeAPI> {
487487
setTimeout(async () => {
488488
try {
489489
init_globalization();
490+
preloadWorkers();
490491
await mono_download_assets();
491492
}
492493
catch (err) {

src/mono/browser/runtime/loader/worker.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
import { MonoConfigInternal, WorkerToMainMessageType, monoMessageSymbol } from "../types/internal";
4+
import { MonoConfigInternal, PThreadInfo, WorkerToMainMessageType, monoMessageSymbol } from "../types/internal";
55
import { MonoConfig } from "../types";
66
import { deep_merge_config, normalizeConfig } from "./config";
7-
import { ENVIRONMENT_IS_WEB, loaderHelpers } from "./globals";
7+
import { ENVIRONMENT_IS_WEB, loaderHelpers, runtimeHelpers } from "./globals";
88
import { mono_log_debug } from "./logging";
99

1010
export function setupPreloadChannelToMainThread() {
@@ -13,7 +13,8 @@ export function setupPreloadChannelToMainThread() {
1313
const mainPort = channel.port2;
1414
workerPort.addEventListener("message", (event) => {
1515
const config = JSON.parse(event.data.config) as MonoConfig;
16-
onMonoConfigReceived(config);
16+
const monoThreadInfo = JSON.parse(event.data.monoThreadInfo) as PThreadInfo;
17+
onMonoConfigReceived(config, monoThreadInfo);
1718
workerPort.close();
1819
mainPort.close();
1920
}, { once: true });
@@ -30,13 +31,13 @@ export function setupPreloadChannelToMainThread() {
3031
let workerMonoConfigReceived = false;
3132

3233
// called when the main thread sends us the mono config
33-
function onMonoConfigReceived(config: MonoConfigInternal): void {
34+
function onMonoConfigReceived(config: MonoConfigInternal, monoThreadInfo: PThreadInfo): void {
3435
if (workerMonoConfigReceived) {
3536
mono_log_debug("mono config already received");
3637
return;
3738
}
38-
3939
deep_merge_config(loaderHelpers.config, config);
40+
runtimeHelpers.monoThreadInfo = monoThreadInfo;
4041
normalizeConfig();
4142
mono_log_debug("mono config received");
4243
workerMonoConfigReceived = true;

src/mono/browser/runtime/managed-exports.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { marshal_array_to_cs, marshal_array_to_cs_impl, marshal_bool_to_cs, mars
1111
import { marshal_int32_to_js, end_marshal_task_to_js, marshal_string_to_js, begin_marshal_task_to_js, marshal_exception_to_js } from "./marshal-to-js";
1212
import { do_not_force_dispose } from "./gc-handles";
1313
import { assert_c_interop, assert_js_interop } from "./invoke-js";
14-
import { mono_wasm_main_thread_ptr } from "./pthreads/shared";
14+
import { mono_wasm_main_thread_ptr } from "./pthreads";
1515
import { _zero_region } from "./memory";
1616
import { stringToUTF8Ptr } from "./strings";
1717

src/mono/browser/runtime/marshal-to-cs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { _zero_region, forceThreadMemoryViewRefresh, localHeapViewF64, localHeap
2222
import { stringToMonoStringRoot, stringToUTF16 } from "./strings";
2323
import { JSMarshalerArgument, JSMarshalerArguments, JSMarshalerType, MarshalerToCs, MarshalerToJs, BoundMarshalerToCs, MarshalerType } from "./types/internal";
2424
import { TypedArray } from "./types/emscripten";
25-
import { addUnsettledPromise, settleUnsettledPromise } from "./pthreads/shared/eventloop";
25+
import { addUnsettledPromise, settleUnsettledPromise } from "./pthreads";
2626
import { mono_log_debug } from "./logging";
2727
import { complete_task } from "./managed-exports";
2828
import { gc_locked } from "./gc-lock";

0 commit comments

Comments
 (0)