Skip to content

Instantly share code, notes, and snippets.

View jdom's full-sized avatar

Julian Dominguez jdom

View GitHub Profile
@jdom
jdom / CodegenDiffReport.html
Last active December 12, 2015 19:01
Codegen diff between master 73f8663 (left) and galvesribeiro DNX branch (right)
<!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; }
using System;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
using BenchmarkDotNet;
namespace BenchmarkIgnoreExceptions
{
public class CompletedIgnoreExceptionBenchmarks
{
@jdom
jdom / Orleans Interception a la MVC Filters
Created November 23, 2015 22:44
This is just a pseudo explanation of what I'd like the interception API in Orleans to look like, basically very similar to the MVC implementation, as people are already familiar with it
// INFRASTRUCTURE PSEUDO CODE
public class MethodInvocationContext
{
/// <summary>
/// Gets the <see cref="MethodInfo"/> that is executing.
/// </summary>
public MethodInfo Method { get; }
/// <summary>
@jdom
jdom / gist:6597e183eabd3251f4bd
Last active August 29, 2015 14:14
Callback in a new Orleans non-reentrant request (suggestion)
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);