Change thread creation algorithm; provide thread cache.