Skip to content

Commit 3c755b7

Browse files
committed
chore: Adjust threading logging
1 parent fa42e91 commit 3c755b7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Uno.Wasm.Threads.Shared/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void logMessage(string message)
8383
int index = Interlocked.Increment(ref counter);
8484
lock (_gate)
8585
{
86-
_messages.Add($"[tid:{Thread.CurrentThread.ManagedThreadId}]: {index} / {message}");
86+
_messages.Add($"[tid:{Thread.CurrentThread.ManagedThreadId}][ctx:{SynchronizationContext.Current?.ToString()}]: {index} / {message}");
8787
}
8888
}
8989

@@ -103,7 +103,7 @@ void DoWork(string name)
103103
#pragma warning disable CA1416 // Validate platform compatibility
104104
new Thread(_ =>
105105
{
106-
Console.WriteLine($"Starting thread [tid:{Thread.CurrentThread.ManagedThreadId}]");
106+
Console.WriteLine($"Starting thread [tid:{Thread.CurrentThread.ManagedThreadId}] [ctx:{SynchronizationContext.Current?.ToString()}]");
107107

108108
_jsContext.Post(_ => MainThreadCallback(), null);
109109
Console.WriteLine("InvokeOnMainThread2");

src/Uno.Wasm.Threads.Shared/WasmScripts/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
});
44

55
var Interop = {
6-
appendResult: async function (str) {
6+
appendResult: function (str) {
77
var txt = document.createTextNode(str);
88
var parent = document.getElementById('results');
99
parent.appendChild(txt, parent.lastChild);

0 commit comments

Comments
 (0)