Skip to content

Instantly share code, notes, and snippets.

View mpoeter's full-sized avatar

Manuel Pöter mpoeter

  • LeanFive, ArangoDB
  • Vienna
View GitHub Profile
@mpoeter
mpoeter / stack-benchmark.cpp
Created April 5, 2020 15:57
Simple synthetic benchmark comparing a lock-free stack to a lock-based one.
#include <atomic>
#include <cassert>
#include <chrono>
#include <iostream>
#include <mutex>
#include <thread>
#include <vector>
#if defined(__sparc__)
#include <synch.h>
@mpoeter
mpoeter / gist:d18885caa3b46d47f031f6d913c93208
Created December 5, 2018 10:33
Async WebSocket queries
defmodule Absinthe.Phoenix.AsyncChannel do
use Phoenix.Channel
require Logger
@doc false
def join("__absinthe__:control", _, socket) do
schema = socket.assigns[:__absinthe_schema__]
absinthe_config = Map.get(socket.assigns, :absinthe, %{})