Skip to content

Instantly share code, notes, and snippets.

View Pslydhh's full-sized avatar

Pslydhh Pslydhh

  • China
View GitHub Profile
@Pslydhh
Pslydhh / manual_lock.cpp
Last active May 6, 2021 09:08
an manual lock compare with pthreadlock
// raceCondition.cpp
#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <linux/futex.h>
#include <syscall.h>
#include <sys/time.h>
pthread_mutex_t mutex;
@Pslydhh
Pslydhh / Cargo.toml
Last active June 12, 2021 04:33
thread_pool_bench with spmc queue
[package]
name = "testspmc"
version = "0.1.0"
authors = ["Pslydhh <luouyuyou@gmail.com>"]