A promise and per-thread promise wrapper class.