)]}'
{
  "commit": "c3d4baadd233635c13c306d9fdff3342710633ed",
  "tree": "ce3900bfd682d9cadb12874fccd92558a288c6ee",
  "parents": [
    "24a9b21b889188a9db08be3701490d54559114a8"
  ],
  "author": {
    "name": "Tom Tromey",
    "email": "tom@tromey.com",
    "time": "Thu Mar 12 14:00:44 2026 -0600"
  },
  "committer": {
    "name": "Tom Tromey",
    "email": "tom@tromey.com",
    "time": "Fri Mar 20 13:04:03 2026 -0600"
  },
  "message": "Add lock_guard to thread_pool::thread_count\n\nI think there\u0027s a possible race when calling thread_pool::thread_count\nfrom a worker thread, if the main thread changes the number of threads\nat the same time.\n\nWhen this code was initially written, we didn\u0027t worry about this,\nbecause this was only accessed from the main thread.  This is no\nlonger the case, though.\n\nThis patch fixes any potential problem by adding a lock_guard to the\nmethod.  This doesn\u0027t seem too harmful because this is not called very\nmuch and because I doubt this lock is highly contended.\n\nWhile doing this I noticed that thread_pool::do_post_task could access\nm_sized_at_least_once and m_thread_count without holding the lock.\nThis patch changes this method as well.\n\nApproved-by: Kevin Buettner \u003ckevinb@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6940773d58abb8a1dc8b13c384543ebd4c36b914",
      "old_mode": 33188,
      "old_path": "gdbsupport/thread-pool.cc",
      "new_id": "4dc72e566428321ad3c287b2c9c07de98967bb07",
      "new_mode": 33188,
      "new_path": "gdbsupport/thread-pool.cc"
    },
    {
      "type": "modify",
      "old_id": "50b7a064d7eaa66344353154b5b8fe16c34e6d17",
      "old_mode": 33188,
      "old_path": "gdbsupport/thread-pool.h",
      "new_id": "a9188d1e10737ec321bc12158d14d8d6a4ea964e",
      "new_mode": 33188,
      "new_path": "gdbsupport/thread-pool.h"
    }
  ]
}
