JDDuke - 2011-12-31

First off, thanks for the library; it eliminates the need to include the beast that is boost or other, heavier threading libraries (Qt, tbb, etc…) while we wait for widespread implementations of std::thread.  Secondly, with but a slight change to the thread() constructor's argument, I've gotten much more mileage out of the library.  Changing the function pointer to a simple std::function<void(void*)> let's me pass not just functions, but lambdas and function objects as well.  Of course this is preceded with a check for such support, but a check along the lines of

#if SUPPORTS_FUNCTIONAL
typedef std::function<void(void*)> thread_func;
#else
typedef void(*thread_func(void*));
#endif

gets the job done nicely.  This is especially useful with compilers that support such features but lack a proper std::thread implementation (e.g., VC10).   Cheers.