How to obtain good concurrent read performance from disk

后端 未结 6 916
我寻月下人不归
我寻月下人不归 2021-01-31 18:12

I\'d like to ask a question then follow it up with my own answer, but also see what answers other people have.

We have two large files which we\'d like to read from two

6条回答
  •  花落未央
    2021-01-31 18:28

    I would create some kind of in memory thread safe lock. Each thread could wait on the lock until it was free. When the lock becomes free, take the lock and read the file for a defined length of time or a defined amount of data, then release the lock for any other waiting threads.

提交回复
热议问题