Skip to content

Instantly share code, notes, and snippets.

Microsoft Visual Studio Community 2017
Version 15.7.2
VisualStudio.15.Release/15.7.2+27703.2018
Microsoft .NET Framework
Version 4.7.02558
Installed Version: Community
Application Insights Tools for Visual Studio Package 8.12.10405.1
Application Insights Tools for Visual Studio
/// <summary>
/// Asynchronous lock with stateful actions to execute.
/// </summary>
internal sealed class AsyncLock<TState> : IDisposable
{
struct Work
{
internal TState state;
internal Action<TState> action;
}
BenchmarkDotNet=v0.10.14, OS=Windows 7 SP1 (6.1.7601.0)
Intel Core i7-4770K CPU 3.50GHz (Haswell), 1 CPU, 8 logical and 4 physical cores
Frequency=3418046 Hz, Resolution=292.5648 ns, Timer=TSC
[Host] : .NET Framework 4.6.1 (CLR 4.0.30319.42000), 32bit LegacyJIT-v4.7.
2558.0
Job-YSPJNA : .NET Framework 4.6.1 (CLR 4.0.30319.42000), 32bit LegacyJIT-v4.7.
2558.0
IterationTime=1.0000 s LaunchCount=1 TargetCount=5
BenchmarkDotNet=v0.10.14, OS=Windows 7 SP1 (6.1.7601.0)
Intel Core i7-4770K CPU 3.50GHz (Haswell), 1 CPU, 8 logical and 4 physical cores
Frequency=3418046 Hz, Resolution=292.5648 ns, Timer=TSC
[Host] : .NET Framework 4.6.1 (CLR 4.0.30319.42000), 32bit LegacyJIT-v4.7.
2558.0
Job-YSPJNA : .NET Framework 4.6.1 (CLR 4.0.30319.42000), 32bit LegacyJIT-v4.7.
2558.0
IterationTime=1.0000 s LaunchCount=1 TargetCount=5
-- Given two hex coordinate points, check if there is a passable path between the two.
--
-- The code should be Dijkstra's algorithm recreated from memory
-- and slightly altered to put nodes closer to the destination
-- in the front of the queue.
-- Unfortunately, this is likely not as efficient as A*, but A*
-- would require a sorted queue or ordered tree which I don't
-- want to implement in Lua, or in fact, in any language myself.
--
<?xml version='1.0' encoding='UTF-8'?>
<jmh-compare-gui-tabs cell-padding='2' csv-separator=',' locale-decimal-separator='false' small-diff='3.0' large-diff='15.0' selected-tab='1'>
<font name='Dialog' style='0' size='14'/>
<small-plus-color r='192' g='255' b='192'/>
<small-minus-color r='255' g='192' b='192'/>
<large-plus-color r='0' g='255' b='0'/>
<large-minus-color r='255' g='0' b='0'/>
<tab title='New tab' compare-index='5' show-errors='false' show-percentages='true' reverse-colors='false'>
<results name='Flowable-Dedicated'>
<parameter-name value='count'/>
<?xml version='1.0' encoding='UTF-8'?>
<jmh-compare-gui-tabs cell-padding='1' csv-separator=',' locale-decimal-separator='true' small-diff='3.0' large-diff='15.0' selected-tab='17'>
<font name='Dialog' style='0' size='16'/>
<small-plus-color r='192' g='255' b='192'/>
<small-minus-color r='255' g='192' b='192'/>
<large-plus-color r='0' g='255' b='0'/>
<large-minus-color r='255' g='0' b='0'/>
<tab title='Memory' compare-index='3' show-errors='false' show-percentages='true' reverse-colors='true'>
<results name='ReactorFlux'>
<result-line benchmark='just' value='14.08' error='0.0'/>
package pkg;
import rx.Observable;
import rx.Observable.OnSubscribe;
import rx.Observable.Transformer;
import rx.Producer;
import rx.Scheduler;
import rx.Scheduler.Worker;
import rx.Subscriber;
import rx.exceptions.MissingBackpressureException;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import org.junit.Test;
import rx.Observable;
import rx.functions.Func1;
public class RetryWhenTimedTest {
using System;
using System.Reactive.Disposables;
using System.Reactive.Subjects;
using System.Threading;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)