Skip to content

Instantly share code, notes, and snippets.

@monstermunchkin
monstermunchkin / cp_with_prog.py
Created April 15, 2012 10:14
Copy function with progress display in Python
#!/usr/bin/python
# Copy function with progress display using a callback function.
# The callback function used here mimics the output of
# 'rsync --progress'.
# Copyright (C) 2012 Thomas Hipp
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@sven-bock
sven-bock / threadpool.cpp
Last active December 18, 2023 14:02
Sample how to create a boost threadpool in a class
#include <boost/asio/io_service.hpp>
#include <boost/bind.hpp>
#include <boost/thread/thread.hpp>
#include <boost/make_shared.hpp>
#include <iostream>
class Bla{
public:
void callback(std::string msg){