post() with const ref.
Added "safety" of passing move-able reference is an illusion since no use_count()==1 test is done. Instead extra (shallow) copies were made for each subscriber. Instead. Pass const reference, redefine MonitorControlOp::post() to transfer ownership, and make only a single copy in SharedPV::post().
This commit is contained in:
+1
-1
@@ -62,7 +62,7 @@ public:
|
||||
|
||||
log_debug_printf(app, "%s count %u\n", sub->peerName().c_str(), unsigned(cnt));
|
||||
|
||||
}while(sub->tryPost(std::move(update)));
|
||||
}while(sub->tryPost(update));
|
||||
};
|
||||
|
||||
sub->onHighMark(fill);
|
||||
|
||||
Reference in New Issue
Block a user