Mbedtls session handling

I am trying to implement a web server using the mbedtls pthread example as i have to handle multiple client connection. Due to the speed issues i want to use the session tickets to speed up the handshakes.Also doing multiple handshake in 5 diffrent threads causing hang in the mpi calculation stuff. What is the right way to use session tickets on server side.I looked in the server2 example but it didnt work for me.