@sijithjames
Several things:

- Your code makes very little sense.
At least I, still can't make out what it is you want to achieve.
Maybe if you state the objective of your code, or your task,we might help you.
I have the feeling it doesn't even have to be threaded.

- Your code shows that you do not understand how threads work in general, and what a mutex is used for, and I think you have even less idea how QThread should be used (there are some points you have to pay attention to when you using QThread, specially thread affinity)

- On one hand, you are using threads, on the other you state that the problem is that:
Now what happening is both object is calling hte run function but calling order we cant predict.. Each time its calling in different order
So it seems you want to have sequential execution order, not parallel execution.
For sequential excution you don't need threads!


Also, the fact you see the printf() output not in a sequential way, doesn't mean that they are not called sequentially.
It could be very well, that for many reasons, the order of printf() calling, and the output you see is not same.

I suggest you start with the basics, and read about threaded programming, and QThread.
Probably most of your problems will be solved that way.


And please use the code tags for posting code, its very hard to read code like that.