Results 1 to 1 of 1
Thread: Threads and Linked list Queues
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Feb 2007
Threads and Linked list Queues
i am facing the problem in the Queue implementaion in the linked list
The mutex is used there to either add the data to Q or to delete it
but the Q can be accessed by many threads .
Suppose thread T1 stars acessing the Q and opens it for adding
by that time another thread t2 is trying to acess it but is unable to do it
as Q is locked by T1 and the result is the segmentation fault
Can anyone suggest the methods to implement the Queue as linked list in the multithreaded environment .