PROGRAM IS TERMINATING PROPERLY. But the output is incorrect and sees duplicates.
Not terminating, but looks like it is at least adding all the files, maybe. Some duplicates at the end
Added mallocs for payload for the queue
REally struggling to get the rest of the threads to terminate, but I think that the problem is that they are waiting on the queue to get full again, but it won't
REally struggling to get the rest of the threads to terminate, but I think that the problem is that they are waiting on the queue to get full again, but it won't
OMG IT WORKED ONCE.
YEP! That was the problem. I added code so that when threads realize that the producers are done and the queue is empty, they sem_post(full) so that other threads can get through to the code to check if the queue is empty and if they should exit or not