Sentinel icon indicating copy to clipboard operation
Sentinel copied to clipboard

线程限制产生竞态条件的一种规避方式

Open manzhizhen opened this issue 6 years ago • 17 comments

Describe what this PR does / why we need it

详细描述见: https://github.com/alibaba/Sentinel/issues/59 一种解决方案:使用信号量+ThreadLocal的方式,保证了原子性,也保证了能在接下来的Slot的处理过程中能利用到前面的结果。

该方式加强了线程限制的准确性,并保持原有的逻辑不变。

Does this pull request fix one issue?

Describe how you did it

Describe how to verify it

Special notes for reviews

manzhizhen avatar Aug 20 '18 16:08 manzhizhen