v0.0.2
Fix an issue where SwitchToMainThread not working if the first API call is SwitchToThreadPool.
// Assuming this is the only script inside a Godot project.
var mainThreadId = System.Environment.CurrentManagedThreadId;
Assertions.AssertThat(Thread.CurrentThread.IsThreadPoolThread).IsFalse();
await GDTask.SwitchToThreadPool();
Assertions.AssertThat(System.Environment.CurrentManagedThreadId).IsNotEqual(mainThreadId);
Assertions.AssertThat(Thread.CurrentThread.IsThreadPoolThread).IsTrue();
await GDTask.SwitchToMainThread();
// This doesn't pass the test in v0.0.1.
Assertions.AssertThat(System.Environment.CurrentManagedThreadId).IsEqual(mainThreadId);
Assertions.AssertThat(Thread.CurrentThread.IsThreadPoolThread).IsFalse();
Full Changelog: v0.0.1...v0.0.2