Skip to content

Instantly share code, notes, and snippets.

View Bajix's full-sized avatar

Thomas Sieverding Bajix

  • Bajix Interactive
View GitHub Profile
FROM mhart/alpine-node:12.13.0
ENV APP /app/api
RUN mkdir -p $APP
WORKDIR $APP
EXPOSE 3333
--require test/suite
--reporter spec
--ui bdd
--recursive
@Bajix
Bajix / dataloader.rs
Created May 10, 2021 13:45
Dataloader WIP
use atomic_take::AtomicTake;
use flume::{self, Receiver, Sender};
use futures::StreamExt;
use futures_batch::ChunksTimeoutStreamExt;
use std::{collections::HashMap, hash::Hash};
use std::{sync::Arc, time::Duration};
use tokio::sync::oneshot;
pub trait Key: Send + Hash + Ord + Eq + Clone + 'static {}
impl<T: Send + Hash + Ord + Eq + Clone + 'static> Key for T {}