Test helper for ordering threaded code
