I am working on a multi-threaded C application using pthreads. I have one thread which writes to a a database (the database library is only safe to be used in a single threa
I'd go for multiple single-writer queues (one per writer thread). Then you can check this for how to get the single reader to read the various queues.