Is there a global named reader/writer lock?

后端 未结 4 1049
执笔经年
执笔经年 2020-12-08 11:26

I have multiple asp.net web apps serving a set of files. Periodically, one will update the file before serving it, but it can\'t update the file if it is in use.

I c

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-08 12:21

    I don't think there's anything that meets your needs as stated (although I reserve the right to be wrong).

    You could serve the file using a service. This solves two problems. First, as you stated, the problem of concurrency. Also, even if you can achieve synchronization, it becomes more difficult and ugly if you start load-balancing. Serving the file using a service will likely cost you in performance, but solves your synchronization problem.

提交回复
热议问题