Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if UNITY_INCLUDE_TESTS
using UnityEditor;
using UnityEditor.TestTools.TestRunner.Api;
using UnityEngine;
Expand Down Expand Up @@ -73,3 +74,4 @@ public void TestStarted(ITestAdaptor test) { }
public void TestFinished(ITestResultAdaptor result) { }
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ internal static class JActionRunner
/// <summary>
/// Marker struct for identifying our update in the PlayerLoop.
/// </summary>
private record struct JActionUpdate;
private struct JActionUpdate { }

#if UNITY_EDITOR
[InitializeOnLoadMethod]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ internal enum JActionTaskType : byte
/// This struct is designed for minimal memory footprint and efficient execution.
/// State is stored externally via <see cref="IStateStorage"/> to avoid boxing value types.
/// </remarks>
internal record struct JActionTask
internal struct JActionTask
{
/// <summary>The type of task operation.</summary>
internal JActionTaskType Type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,18 @@ namespace JEngine.Util
/// for proper compiler warnings when not awaited.
/// </para>
/// </remarks>
public readonly record struct JActionAwaitable(JAction Action)
public readonly struct JActionAwaitable
{
/// <summary>The JAction instance being awaited.</summary>
public readonly JAction Action;

/// <summary>
/// Initializes a new instance of the <see cref="JActionAwaitable"/> struct.
/// </summary>
/// <param name="action">The JAction to await.</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public JActionAwaitable(JAction action) => Action = action;

/// <summary>
/// Gets the awaiter for this awaitable.
/// </summary>
Expand All @@ -39,8 +49,18 @@ public readonly record struct JActionAwaitable(JAction Action)
/// This struct implements <see cref="ICriticalNotifyCompletion"/> to support
/// both regular and unsafe continuations, enabling efficient async state machine behavior.
/// </remarks>
public readonly record struct JActionAwaiter(JAction Action) : ICriticalNotifyCompletion
public readonly struct JActionAwaiter : ICriticalNotifyCompletion
{
/// <summary>The JAction instance being awaited.</summary>
public readonly JAction Action;

/// <summary>
/// Initializes a new instance of the <see cref="JActionAwaiter"/> struct.
/// </summary>
/// <param name="action">The JAction to await.</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public JActionAwaiter(JAction action) => Action = action;

/// <summary>
/// Gets whether the <see cref="JAction"/> has completed execution.
/// </summary>
Expand Down