Multiple-writer thread-safe queue in C

后端 未结 4 1028
旧巷少年郎
旧巷少年郎 2020-12-08 03:21

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

4条回答
  •  情书的邮戳
    2020-12-08 03:53

    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.

提交回复
热议问题