let t = client_thread () in ..... (fun () -> t) 
is a bit heavy as construction.....