What do when OpenGL just hates multithreading?

OpenGL will only accept calls from one thread in an application. This is about a work around this issue using C++ features such as template metaprogramming and std::packaged_tasks