added assert to avoid arthematic crash
This commit is contained in:
1 parent
f5d0468e41
commit
ca7769efe3
2 files changed
+2
No files matched your search
@@ -97,6 +97,7 @@ CMEOptions {
|
||||
feed_engine {
|
||||
name: "mdp3feed"
|
||||
spin_time: 0
|
||||
channels_per_thread: 3
|
||||
}
|
||||
channel {
|
||||
id: "*"
|
||||
|
||||
@@ -86,6 +86,7 @@ const onixs::FeedEngineSettings feed_engine_settings_from_config(
|
||||
if (settings.num_threads() != 0) {
|
||||
result.threadCount(settings.num_threads());
|
||||
} else {
|
||||
bts_assert(settings.channels_per_thread()>0);
|
||||
// If num_threads is absent determine thread count based on #channels
|
||||
result.threadCount((feed_count / settings.channels_per_thread()) + 1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user