I hereby claim:
- I am JeffCyr on github.
- I am jeffcyr (https://keybase.io/jeffcyr) on keybase.
- I have a public key whose fingerprint is ED99 66CA 462F 2270 B5A3 11E6 9D80 F1B3 34BF C1B9
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Runtime.InteropServices; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace Alignment | |
{ | |
public class MemoryAlignmentAttribute : Attribute |
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace TplPitfalls | |
{ | |
public class SingleThreadTaskScheduler : TaskScheduler | |
{ |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Reflection; | |
using System.Runtime.CompilerServices; | |
using System.Threading.Tasks; | |
namespace TaskSchedulerBenchmark | |
{ | |
public class CustomTaskScheduler : TaskScheduler |
void Main() | |
{ | |
var testScheduler = new TestTaskScheduler(); | |
CallContext.LogicalSetData("foo", "bar"); | |
Task.Run(() => | |
{ | |
CallContext.LogicalGetData("foo").Dump("Task.Run"); | |
}).ContinueWith(_ => |
public static class TaskEx | |
{ | |
/// <summary> | |
/// Continue the execution on the specified TaskScheduler. | |
/// The awaiter will be synchronous if the current TaskScheduler | |
/// is the specified TaskScheduler. | |
/// </summary> | |
public sealed class TaskSchedulerAwaiter : INotifyCompletion | |
{ | |
private TaskFactory m_factory; |