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
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) {} |
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
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 |