High-level thread library