Start of threaded support in the client, also requires lambdas