【发布时间】:2013-07-01 17:33:38
【问题描述】:
我在我的 linux C 程序中创建了一个管道和一个线程。所以有2个线程:主线程和第二个线程。
第二个线程将字节写入管道。
在主线程中,我为管道注册了一个EV_READ事件(libevent,它类似于epoll/poll中的read事件)。当管道中有可用字节时,触发事件。
这种管道使用是否存在线程安全问题?
谢谢!
【问题讨论】:
标签: linux network-programming thread-safety pipe