Why are you trying to new two threads? Please notice that you just forget to release them.
If you want to call functions in threads one by one, you may need to build a series of muteces and condition variables which hold the fact that the function in the following thread is triggered by the relative previous one.