Releases: Delsin-Yu/GDTask.Nuget
Releases · Delsin-Yu/GDTask.Nuget
v1.3.0
- Add support for
.Net 9
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
</PropertyGroup>
- Make the
GDTask
andGDTask<T>
struct implement theIGDTask
interface.
partial struct GDTask : IGDTask;
partial struct GDTask<T> : IGDTask;
public interface IGDTask
{
IGDTaskAwaiter GetAwaiter();
}
public interface IGDTaskAwaiter : ICriticalNotifyCompletion
{
bool IsCompleted { get; }
object GetResult();
}
Full Changelog: v1.2.2...v1.3.0
v1.2.2
- Added Extra Runtime Checks to Prevent Package Consumers from Calling GDTask APIs under Editor Codes.
public partial class EditorHintCheck : Node
{
[ModuleInitializer]
public static void Init()
{
// Now throws InvalidOperationException instead of crashing the editor
GDTask.Delay(TimeSpan.Zero);
}
}
- Implement from Up-Stream: Remove unnecessary AwakeMonitor/EnterTreeMonitor.
v1.2.1
v1.2.0
v1.1.0
v1.0.0
v0.0.3
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