hi wysota,

hi it means,normally if a function take longer time,we use threading to avoid problems,
but in my case i did it, as there are many process at the same time access the function,
we need to lock the function,so one thread can only access...

i have tried with threading ,but when many thread calls that function ,the application
hangs
Qt Code:
  1. mutex.lock();
  2. while(status == 1)
  3. {
  4. thisthread->setPriority(QThread::LowestPriority);
  5. thisthread->start();
  6. }
  7. thisthread->quit();
  8. mutex.unlock();
To copy to clipboard, switch view to plain text mode 

This is what i have done...i will change the status=0 in a timer within some seconds(2 sec)
but due to the while loop ,the app gets hanged.and it does not allow the timer to timeout
to change the status=0
So that i am trying to use threading ,and as many process will call this while loop ,so i need a mutex to lock...
pls help me...
thanks