Uh oh!
There was an error while loading. Please reload this page.
[browser] threads & js cleanup - #86278
Conversation
ghost
commented
May 15, 2023
Tagging subscribers to 'arch-wasm': @lewing Issue Detailsnull
|
pavelsavara
commented
May 15, 2023
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
pavelsavara
commented
May 18, 2023
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
pavelsavara
commented
May 18, 2023
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
pavelsavara
commented
May 23, 2023
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
pavelsavara
commented
May 23, 2023
AOT issues are #86621 |
pavelsavara
commented
May 23, 2023
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
pavelsavara
commented
May 23, 2023
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
pavelsavara
commented
May 24, 2023
CI failures are unrelated |
ilonatommy
left a comment
There was a problem hiding this comment.
After discussing offline: LGTM.
ilonatommy
left a comment
There was a problem hiding this comment.
After discussing offline: LGTM.
pavelsavara
commented
May 24, 2023
@lambdageek or @kg please have yet another look and approve. I think the only part which needs your attention is change from invoke via mono reflection to invoke via |
lambdageek
left a comment
There was a problem hiding this comment.
Mostly LGTM. A couple of nits.
Two things to consider addressing:
- The
_DataIsAvailabledelegate is there to avoid allocating a new delegate object each time - The 25s delay is testing the threadpool worker timeout doesn't kill a worker that has unsettled promise. Changing to 5s changes the test.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| [DynamicDependency("Callback")] | ||
| [MethodImplAttribute(MethodImplOptions.InternalCall)] | ||
| private static extern void QueueCallback(); | ||
| internal static extern unsafe void MainThreadScheduleBackgroundJob(void* callback); |
There was a problem hiding this comment.
nit: It would be nice to collect all of these internal calls that are called inside S.P.C into a single class
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
added comments added missing export of _emscripten_main_runtime_thread_id
pavelsavara
commented
May 24, 2023
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Uh oh!
There was an error while loading. Please reload this page.
add asserts and exception handlers
pavelsavara
commented
May 24, 2023
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
kg
commented
May 24, 2023
I'm not sure that invoking via UnmanagedCallersOnly will transition from one GC mode to another correctly. @lambdageek do you know? |
It will work correctly (unless you use |
# Conflicts: # src/mono/wasm/wasm.proj
This is just cleanup. There are no intended functional changes.
TimerQueue
SetTimeouttoMainThreadScheduleTimerReplaceNextSetTimeouttoReplaceNextTimerTimeoutCallbacktoTimerHandlermono_wasm_set_timeouttomono_wasm_main_thread_schedule_timermono_set_timeout_exectomono_wasm_execute_timer[UnmanagedCallersOnly]instead ofmono_runtime_try_invokeThreadPool
QueueCallbacktoMainThreadScheduleBackgroundJobusingmono_main_thread_schedule_background_jobCallbacktoBackgroundJobHandler[UnmanagedCallersOnly]instead ofmono_runtime_try_invokeJSSynchronizationContext
RequestPumpCallbackScheduleBackgroundJobtoMainThreadScheduleBackgroundJobusingmono_main_thread_schedule_background_jobJobs
mono_threads_schedule_background_jobintomono_current_thread_schedule_background_jobandmono_main_thread_schedule_background_jobMT Debugger
bind_static_method.Other
install_sync_contextbrowser-threads-minimalto pass on Windowsmono_threads_wasm_async_run_in_target_threadmono_bound_thread_schedule_background_jobin preparation for next stepconv_stringto different file_get_class_name,_get_type_name,_get_type_aqnmethodsmono_wasm_bind_cs_functionandmono_wasm_bind_js_functiononly under Debug build of the runtime. It makes debugging easier because names the exported/imported function are visible on the stack trace.normalizeConfigafter it arrived by message.