The createPipe subroutine is a simple method to create a nonblocking read from a pipe using threads.
createpipe子例程是从使用线程的管道中进行无阻塞读取的简单方法。
Listing 8 shows the createPipe subroutine used to set up a background connection to the cnee program.
清单8显示了用于设置与cnee程序之间的后台连接的createpipe子例程。
Listing 5 shows the createPipe subroutine used to create a nonblocking link to the xev monitoring program, as well as the printHeader subroutine, which prints the data header information to STDERR.
清单5显示了用于创建与xev监视程序之间的非阻塞链接的createpipe子例程,以及用于将数据头信息输出到STDERR中的printheader子例程。
应用推荐