)]}'
{
  "commit": "21796195994dbcc04598eebc6cf351bd0e27f95f",
  "tree": "07fee601dd7cfaaacac73f7aa302805758dc3876",
  "parents": [
    "bca56b3956549f068f62590d643c01f5e067713d"
  ],
  "author": {
    "name": "Sam Clegg",
    "email": "sbc@chromium.org",
    "time": "Thu Sep 30 18:49:46 2021"
  },
  "committer": {
    "name": "Sam Clegg",
    "email": "sbc@chromium.org",
    "time": "Fri Oct 01 05:44:51 2021"
  },
  "message": "Fix deadlock when calling fflush during application shutdown\n\nOne solution to the deadlock described in #15186 is to allow nested\ncalls to `emscripten_current_thread_process_queued_calls`.\n\nThis is needed in this case because the main thread is calling `fflush`\n(which requires locking the stdout handle) while another thread is\nholding the stdout lock, waiting on the main thread to process the write\naction.\n\nThere may be reasons we don\u0027t want to allow nested calls to\n`emscripten_current_thread_process_queued_calls` but technically its\nseems possible.\n\nThis change removes all the mitigations that existed in\n`test_pthread_c11_threads.c` and I could no longer reprodude the\ndeadlock.\n\nFixes: #15186\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0a4ee29c393eb1373c5ff90a8a55301e6af704ec",
      "old_mode": 33188,
      "old_path": "system/lib/pthread/library_pthread.c",
      "new_id": "55ffec28bc0bbd655b7a52ca732ab4d810cd18c9",
      "new_mode": 33188,
      "new_path": "system/lib/pthread/library_pthread.c"
    },
    {
      "type": "modify",
      "old_id": "684ddd39747eb7b906f5c797c78fe1b5742d4135",
      "old_mode": 33188,
      "old_path": "tests/jsrun.py",
      "new_id": "72b759f87f781331da11c4d7713a7cc3ca2687e5",
      "new_mode": 33188,
      "new_path": "tests/jsrun.py"
    },
    {
      "type": "modify",
      "old_id": "ac7a4631ea31ac116b3379cb7e07681393acc0d9",
      "old_mode": 33188,
      "old_path": "tests/pthread/test_pthread_c11_threads.c",
      "new_id": "37a824febcc99c1c663d9af58eb9e0bb5d56ee2c",
      "new_mode": 33188,
      "new_path": "tests/pthread/test_pthread_c11_threads.c"
    }
  ]
}
