Skip to content

Instantly share code, notes, and snippets.

View zacharytanor's full-sized avatar

Zachary Tanor zacharytanor

  • Poland
View GitHub Profile
@phg1024
phg1024 / threadexample.cpp
Last active November 9, 2023 08:06
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;