This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<style> | |
.AlignLeft { text-align: left; } | |
.AlignCenter { text-align: center; } | |
.AlignRight { text-align: right; } | |
body { font-family: sans-serif; font-size: 11pt; } | |
td { vertical-align: top; padding-left: 4px; padding-right: 4px; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics.CodeAnalysis; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using BenchmarkDotNet; | |
namespace BenchmarkIgnoreExceptions | |
{ | |
public class CompletedIgnoreExceptionBenchmarks | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// INFRASTRUCTURE PSEUDO CODE | |
public class MethodInvocationContext | |
{ | |
/// <summary> | |
/// Gets the <see cref="MethodInfo"/> that is executing. | |
/// </summary> | |
public MethodInfo Method { get; } | |
/// <summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyCustomGrain : IMyCustomGrain // note that this grain is NOT reentrant | |
{ | |
public async Task<int> MyPublicGrainMethod() | |
{ | |
// do some async work in the "1st request" | |
await this.SomethingThatNeedsToRunDuringTheGrainCall(); | |
// now start the async call that I don't want to await during the grain call, but I want the continuation to run in a full non-reentrant request. | |
var myIoTask = someClient.ExecuteIoCallAsync(); | |
myIoTask.ContinueNonReentrant(this.MyCustomContinuation); |