add std thread version and comments