Threadpool initial implementation

Note that the code is NOT debugged, yet