[Tile-serving] [openstreetmap/osm2pgsql] Refactor pending processor (#1176)

Jochen Topf notifications at github.com
Thu May 21 07:55:46 UTC 2020


@joto commented on this pull request.



>  
     static osmid_t pop_id(pending_queue_t &queue, std::mutex &mutex)
     {
         osmid_t id = 0;
 
         std::lock_guard<std::mutex> const lock{mutex};
         if (!queue.empty()) {
-            id = queue.top();
-            queue.pop();
+            id = queue.back();
+            queue.pop_back();

`stack::top()` calls the underlying containers `back()` function, and `pop()` calls `pop_back()`. So I believe we are doing exactly the same here.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1176#discussion_r428502378
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20200521/88f7bfa5/attachment.htm>


More information about the Tile-serving mailing list