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
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
-- https://stackoverflow.com/questions/48220977/traversing-with-a-biapplicative | |
module Main where | |
import Data.Biapplicative | |
import Data.Char (ord) | |
main :: IO () |
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
// Straight-line version | |
// ===================== | |
// I imagine could be as easy as | |
auto future_a = client_a->async_send_request(); | |
auto future_b = client_b->async_send_request(); | |
auto status_a = future_a.wait_for(timeout); | |
auto status_b = future_b.wait_for(0ms); | |
if (status_a == ready && status_b == ready) { |