Skip to content

Instantly share code, notes, and snippets.

@SlowPokeInTexas
SlowPokeInTexas / logging.hpp
Last active June 6, 2021 21:41 — forked from kevinkreiser/logging.hpp
Thread-safe logging singleton c++11
#ifndef __LOGGING_HPP__
#define __LOGGING_HPP__
/*
Test this with something like:
g++ -std=c++11 -x c++ -pthread -DLOGGING_LEVEL_ALL -DTEST_LOGGING logging.hpp -o logging_test
./logging_test
*/
#include <string>
@SlowPokeInTexas
SlowPokeInTexas / WaitGroup.hpp
Created June 5, 2021 21:49
C++ WaitGroup a la Golang
#pragma once
#include <thread>
#include <condition_variable>
#include <mutex>
namespace CppWaitGroup
{