threading: New helper functions and structs for doing threaded work, these are on a higher level then the one in os wrappers.