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
#!/usr/bin/env bash | |
TOOLS=/tools | |
echo "download dotnet diagnostic tools" | |
mkdir "$TOOLS" | |
chmod 777 $TOOLS | |
cd "$TOOLS" | |
tools="dump gcdump source stack trace counters monitor sos" | |
for t in $tools; do wget -O $TOOLS/dotnet-$t https://aka.ms/dotnet-$t/linux-musl-x64; done; | |
chmod +x $TOOLS/dotnet-* |
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
open System | |
open System.Threading.Tasks | |
open Proto | |
open Proto.Mailbox | |
type Actor with | |
static member SpawnFromFunc handler = | |
let wrapper = fun c -> | |
handler(c) | |
Task.FromResult(0) |
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
defmodule ExDistUtils do | |
def start_distributed(appname) do | |
unless Node.alive?() do | |
local_node_name = generate_name(appname) | |
{:ok, _} = Node.start(local_node_name) | |
end | |
cookie = Application.get_env(appname, :cookie) | |
Node.set_cookie(cookie) | |
end |