unsigned int MessageQueue::pushToEnd(JsonObject& newJO){ newJO.PutInt("mq_time", current_date_time_msec()); pthread_mutex_lock(&p_mutex); mq.push_back(newJO); int size = mq.size(); pthread_mutex_unlock(&p_mutex); return size; }