Skip to content

Instantly share code, notes, and snippets.

namespace Benchmark
open BenchmarkDotNet.Attributes
open BenchmarkDotNet.Running
[<HtmlExporter>]
type CommaAndDot() =
let mutable words : string list = []
[<Params (0, 1, 10, 100)>]
type QueuingSynchronizationContext() =
inherit SynchronizationContext()
let threadId = Thread.CurrentThread.ManagedThreadId
let queue = new BlockingCollection<_>()
override __.Post(cb, state) =
queue.Add((cb, state))