You check prm.handler
for nil
within the for-loop but it seems it's nowhere set or changed. Why isn't this check placed before for-loop at once?
All
WithXXX
&SetXXX
methods should be used only for parameters that have default values.
That is still true for engine (testNewEngine(t, WithShardPoolSize(1))
).
But I don't agree…
My fault. Removed them because of RunEngine(t)
, then removed this method and got these requires back
Just a question, why have you decided to go with
(e *engine) WithX(t) *engine
instead of(e *engine) setX(t)
?
Fair point. I changed implementation few times: initially this wasn't method…
I got your point but I wouldn't say that RunEngine
is the option. It rather changes the eninge's state and that's why I implemented this with method chaining (without options pattern). I'll get…
This rather has supportive meaning. It is needed to keep shardIDs in the same order as they are added to engine. Also this allows to not iterate over engine shards and get shardIDs immediatly
I would be glad to take any suggestion about testShards
initialization. I tried to use intoduced WithShardsNumFromOpts
but after rebase I was obliget to apply this hack with testShards
.