R二进制FIFO在Windows 10上失败

时间:2019-06-25 10:15:36

标签: windows windows-10 r rstudio fifo

我正在尝试设置FIFO缓冲区以监视并行计算的进度。 pbmcapply中已经实现了类似的想法,在Debian(R 3.6.0)上,我可以使其正常工作。但是,在Windows 10(R 3.5.2)上,会发生以下情况:

> myFifoFile <- tempfile()
> (myFifo <- fifo(myFifoFile, open = "w+b", block = TRUE))
A connection with
description "C:\\Users\\current_user\\AppData\\Local\\Temp\\RtmpQRB1Ns\\file3e8875255a7c"
class       "fifo"
mode        "w+b"
text        "text"
opened      "opened"
can read    "yes"
can write   "yes"
> writeBin(1L, myFifo)
Error in writeBin(1L, myFifo) : can only write to a binary connection

如果我创建一个file连接,则不会发生相同的错误。如何建立与fifo的二进制连接?

0 个答案:

没有答案