How to effectively log asynchronously?

前端 未结 10 1081
无人及你
无人及你 2020-12-07 07:28

I am using Enterprise Library 4 on one of my projects for logging (and other purposes). I\'ve noticed that there is some cost to the logging that I am doing that I can miti

10条回答
  •  时光取名叫无心
    2020-12-07 08:10

    If what you have in mind is a SHARED queue, then I think you are going to have to synchronize the writes to it, the pushes and the pops.

    But, I still think it's worth aiming at the shared queue design. In comparison to the IO of logging and probably in comparison to the other work your app is doing, the brief amount of blocking for the pushes and the pops will probably not be significant.

提交回复
热议问题