serialization/deserialization of results using treadp and cbufs