Skip to content

Instantly share code, notes, and snippets.

View ibraheemdev's full-sized avatar

Ibraheem Ahmed ibraheemdev

View GitHub Profile
use hyper::service::{make_service_fn, service_fn};
use hyper::{Body, Request, Response, Server};
use std::convert::Infallible;
use std::sync::Arc;
use tokio_postgres::{Client, NoTls};
#[tokio::main]
async fn main() {
let (client, connection) = tokio_postgres::connect("host=localhost user=postgres", NoTls)
.await
use std::marker::PhantomData;
use std::sync::atomic::{self, AtomicBool, AtomicU8, Ordering};
use std::sync::Mutex;
struct Parker;
impl Parker {
fn register(&mut self) {}
fn unregister(&mut self) {}
fn notify_one(&mut self) {}