Skip to main content

Timeline for Filter request code handler

Current License: CC BY-SA 3.0

6 events
when toggle format what by license comment
Nov 15, 2016 at 11:55 comment added bowmore The Semaphore checks it for you, if all permits are out, it won't give any more until one is released.
Nov 15, 2016 at 8:46 comment added Jenny M One last question :) , you remove the if in your example if (value >= maxCunnccurent) { why ? I just want to verify that I didn't exceed the limit...
Nov 15, 2016 at 7:44 vote accept Jenny M
Nov 15, 2016 at 7:39 comment added bowmore Semaphore is just a more natural fit, and it does some of the work you need to do to manage the count for you. As yu can see, it simplifies the code for managing the maximum number of threads. Semaphore is an abstraction over a logical amount of permits, you want to permit only a maximum number of Threads to simultaneously filter.
Nov 15, 2016 at 7:24 comment added Jenny M Thanks! why the semaphore is better then atomic in this case , not sure that I fully got it, can you please explain...
Nov 14, 2016 at 21:56 history answered bowmore CC BY-SA 3.0