How to interrupt a fread call?

后端 未结 6 1263
暗喜
暗喜 2021-01-18 13:19

I have the following situation:

There is a thread that reads from a device with a fread call. This call is blocking as long as there is no data send from the device.

6条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-18 13:40

    You can use the kill() syscall.

    UPDATE

    Turns out I misread your question. As R. pointed out below, kill() is only for killing processes, not threads.

提交回复
热议问题