Multiple subscriber queue allocation using the same callback
I am creating multiple subscribers using the same callback function as in this post, the code is here.
Basically is this:
for ( int i = 0; i<topics.size(); i++ )
sub[i] = n_.subscribe( topics[i], queue_size, &MyClass::callback, this );
In this case to whom is assigned queue_size
? How does it work?
I would like to think that queue_size
is assigned to the subscriber sub[i]
and that it doesn't matter that all the subscribers use the same callback. I mean:
Is the queue_size
independent of the callback function?