UniTask marked StructLayout(LayoutKind.Auto)

master
neuecc 2020-05-24 01:30:33 +09:00
parent 70385c4115
commit da7e9fc4b3
1 changed files with 4 additions and 3 deletions

View File

@ -1,13 +1,12 @@
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
#pragma warning disable CS0436 #pragma warning disable CS0436
using Cysharp.Threading.Tasks.CompilerServices;
using System; using System;
using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.ExceptionServices; using System.Runtime.ExceptionServices;
using Cysharp.Threading.Tasks.CompilerServices; using System.Runtime.InteropServices;
using Cysharp.Threading.Tasks.Internal;
namespace Cysharp.Threading.Tasks namespace Cysharp.Threading.Tasks
{ {
@ -26,6 +25,7 @@ namespace Cysharp.Threading.Tasks
/// Lightweight unity specified task-like object. /// Lightweight unity specified task-like object.
/// </summary> /// </summary>
[AsyncMethodBuilder(typeof(AsyncUniTaskMethodBuilder))] [AsyncMethodBuilder(typeof(AsyncUniTaskMethodBuilder))]
[StructLayout(LayoutKind.Auto)]
public readonly partial struct UniTask public readonly partial struct UniTask
{ {
readonly IUniTaskSource source; readonly IUniTaskSource source;
@ -353,6 +353,7 @@ namespace Cysharp.Threading.Tasks
/// Lightweight unity specified task-like object. /// Lightweight unity specified task-like object.
/// </summary> /// </summary>
[AsyncMethodBuilder(typeof(AsyncUniTaskMethodBuilder<>))] [AsyncMethodBuilder(typeof(AsyncUniTaskMethodBuilder<>))]
[StructLayout(LayoutKind.Auto)]
public readonly struct UniTask<T> public readonly struct UniTask<T>
{ {
readonly IUniTaskSource<T> source; readonly IUniTaskSource<T> source;