Passing Segment Context between Threads in a Multithreaded Application