Skip to content

Instantly share code, notes, and snippets.

View nickplee's full-sized avatar
🎹

Nick Lee nickplee

🎹
View GitHub Profile
@nickplee
nickplee / threadexample.cpp
Created May 10, 2016 20:43 — forked from phg1024/threadexample.cpp
a simple thread example to show thread-safe vector operation
#include <iostream>
#include <concurrent_vector.h>
#include <thread>
#include <algorithm>
#include <cstdlib>
#include <atomic>
#include <vector>
#include <mutex>
int counter = 0;