Remove a useless message copy
This commit is contained in:
parent
0822482b4d
commit
95df1a4c25
@ -356,11 +356,7 @@ typename WorkerPool<HandlerType>::ReplyType*
|
|||||||
WorkerPool<HandlerType>::SendMessageWithReply(MessageType* message) {
|
WorkerPool<HandlerType>::SendMessageWithReply(MessageType* message) {
|
||||||
ReplyType* reply = NewReply(message);
|
ReplyType* reply = NewReply(message);
|
||||||
|
|
||||||
// Copy the message
|
// Add the pending reply to the queue
|
||||||
MessageType copy;
|
|
||||||
copy.MergeFrom(*message);
|
|
||||||
|
|
||||||
// Add the copy to the queue
|
|
||||||
{
|
{
|
||||||
QMutexLocker l(&message_queue_mutex_);
|
QMutexLocker l(&message_queue_mutex_);
|
||||||
message_queue_.enqueue(reply);
|
message_queue_.enqueue(reply);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user