What I want to do is something on lines of...
pthread_create(&producer_thread, &to_join, producer_routine, &queue);
pthread_detach(producer_thread);
...
...
pthread_join(producer_thread, NULL);
Is this possible in some way, on running the above code, it is unable to join the thread.