Hey guys i need a little help here.
i have a plane management system to build. i have completed the project and i run it in three separate threads. Here i have some problem with the threads. One thread adds the plane to the landing queue. The second thread arranges the planes in the queue depending upon the fuel left. The plane with less fuel is sorted to the first position in the queue.
i am running two threads and i want to pause sorting thread the moment i am running the adding thread. when the addition is complete i wanna run the sorting thread that sorts the planes in the queue.
I dont know how to use threads like that. locking the mutex does not work.