Blocking Locks versus Non-Blocking Locks

后端 未结 2 1042
暗喜
暗喜 2021-01-13 12:01

I am thinking here: If you have 2 threads executing FAST operations that need to be synchronized, isn\'t a nonblocking approach faster/better than a blocking/context switch

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-13 12:31

    Well the only way to be sure is test it. When it comes to multithreading and performance you simply can't assume.

提交回复
热议问题