Lightweight in-process concurrent programming