4 using System.Runtime.CompilerServices;
5 using System.Threading.Tasks;
7 namespace SiliconStudio.Core.MicroThreading
21 this.scheduler = scheduler;
22 this.microThread = null;
25 public bool IsCompleted
32 microThread = scheduler.Add(() => { continuation();
return Task.FromResult(
true); });
37 return new SwitchMicroThread(microThread);
45 private struct SwitchMicroThread : IDisposable
51 this.microThread = microThread;
Represents an execution context managed by a Scheduler, that can cooperatively yield execution to ano...
void OnCompleted(Action continuation)
SwitchToAwaiter(Scheduler scheduler)
SwitchToAwaiter GetAwaiter()
Scheduler that manage a group of cooperating MicroThread.