akka/akka-core

Use AsynchronousFileChannel for FileSource

開放

#30,031 建立於 2021年2月14日

 (4 則留言) (0 個反應) (0 位負責人)Scala (3,547 個分叉)batch import
1 - triagedhelp wantednice-to-have (low-prio)t:stream

倉庫指標

星標
 (13,277 顆星)
PR 合併指標
 (平均合併 8天 19小時) (30 天內合併 10 個 PR)

描述

I was a bit surprised reading the Streaming File IO docs to read

Please note that these operators are backed by Actors and by default are configured to run on a pre-configured threadpool-backed dispatcher dedicated for File IO. This is very important as it isolates the blocking file IO operations from the rest of the ActorSystem allowing each dispatcher to be utilised in the most efficient way.

Looking around I found that AsyncFileChannel was implemented differently on different Operating Systems. So on Windows apparently it does use underlying asynchronous IO.

It would be interesting to find out on which other platforms this makes a difference.

貢獻者指南