Add a maxQueueSize configuration option - #765
Conversation
There was a problem hiding this comment.
Did this to avoid an useless cast from NSUInteger (long on 64bits) to int
f2prateek
left a comment
There was a problem hiding this comment.
Nice - can we add a test case for when a custom queue size is set?
Codecov Report
@@ Coverage Diff @@
## master #765 +/- ##
==========================================
+ Coverage 81% 85.43% +4.43%
==========================================
Files 54 52 -2
Lines 2785 2616 -169
==========================================
- Hits 2256 2235 -21
+ Misses 529 381 -148 |
|
@f2prateek pushed a test |
03a00f0 to
4b05b45
Compare
4b05b45 to
15eed6a
Compare
There was a problem hiding this comment.
what if somebody sets maxQueueSize to 0?
There was a problem hiding this comment.
Oh, good catch! I guess we have to choose from one of these behaviours (ordered with what I think is best first) :
- forbid using
maxQueueSize = 0and throw an error inmaxQueueSizesetter if 0 is set - when
maxQueueSize == 0ignore all events - when
maxQueueSize == 0behave likemaxQueueSize == 1
There was a problem hiding this comment.
Option 4: maxQueueSize == 0 should behave like a no-op, i.e. use the default setting.
There was a problem hiding this comment.
Option 5: Document that this must be > 1, and when maxQueueSize == 0 the behaviour is unspecified. I think this is reasonable for now.
There was a problem hiding this comment.
Can we also document the default value here?
|
Pushed improved docs @f2prateek |
|
hey @fathyb - think we might need a more complicated rebase here. I'll re-assign this back to you for now! |
7e9a433 to
a507953
Compare
a507953 to
51e00ab
Compare
Ref: LIB-442