I'm developing an instant messaging application.
This is the situation which I need help: A routine in my code fgets() the message the user has entered. Now I need to wake up a thread which has a routine to send the message to the socket etc. I'm not really sure how to do this.
If I'm using a mutex: I dont want my first thread to ever wait. Hence i dont want to use this. Similarly I cant use cond_variable.
Please tell me how to get this.