)]}'
{
  "commit": "78fab5d4a5877d161d9bf27d968c71190cb1cd81",
  "tree": "d032a78aa8cd57453c557c3f09761f907543a2a0",
  "parents": [
    "7c8be3dab1218d74c0081636e2321febdacda43f"
  ],
  "author": {
    "name": "Sam Clegg",
    "email": "sbc@chromium.org",
    "time": "Sun Aug 15 14:48:44 2021"
  },
  "committer": {
    "name": "Sam Clegg",
    "email": "sbc@chromium.org",
    "time": "Mon Aug 16 02:40:46 2021"
  },
  "message": "Remove incorrect/non-working (and used?) implementation of pthread_kill\n\nOur implementation of `pthread_kill` seems to be based on the assumption\nthat this function is supposed to kill and given thread.  This is not\ntrue.  Instead `pthread_kill` works more like `kill` in that is delivers\nand async signal to a given thread.  There are many such signals\navailable such as SIGUSR1, SIGUSR2, SIGKILL, and SIGTERM.   All that\npthread_kill does that is different from `kill` is that it enables the\ncaller to decided which thread the signal handler should run in.  There\nis no signal that can sent that reults in a termination of a given\nthread.  Sending SIGKILL (which is unblockable) will still bring down\nthe entire program.  There is no pthread API for asynronously killing a\nsingle thread, only pthread_cancel, which requires some cooperation from\nthe thread being terminated.\n\nThe currently implementation of `pthread_kill` is based on\n`worker.terminate()`, which will kill the worker even if it is in a busy\nloop (how does this work at the OS level I wonder?), is problematic\nbecuse the thread has no way to clean up or free resources which can\nlead to memory leaks.\n\nFinally, `pthread_kill` does not currently work under chrome (brings\ndown the entire tab) so this leads me to believe that it is very\nunlikely anyone is relying on the feature.\n\nFixes: #14872\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7d944e865174ef1615f4c78e7f6d4772ecfd897e",
      "old_mode": 33188,
      "old_path": "ChangeLog.md",
      "new_id": "56e3e8ba2be59b1767f4b3d81fbae4e328767a3e",
      "new_mode": 33188,
      "new_path": "ChangeLog.md"
    },
    {
      "type": "modify",
      "old_id": "deb8dcac67173613817319cbb69cc8821054cc21",
      "old_mode": 33188,
      "old_path": "src/library_pthread.js",
      "new_id": "309732f0bf40fb157d5ece9178dd0434eb6a87dd",
      "new_mode": 33188,
      "new_path": "src/library_pthread.js"
    },
    {
      "type": "modify",
      "old_id": "eb23f480bd110ac574f07fd420c62fce9c3e8470",
      "old_mode": 33188,
      "old_path": "src/library_signals.js",
      "new_id": "ccb6aee7c2aaeac4c2dd343793a6ebf874eb5c31",
      "new_mode": 33188,
      "new_path": "src/library_signals.js"
    },
    {
      "type": "delete",
      "old_id": "86908bbbfd4ffb8899c5c7800182e2845cf53bc2",
      "old_mode": 33188,
      "old_path": "tests/pthread/test_pthread_kill.cpp",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "modify",
      "old_id": "a4d52a8a0d325f22f7a1a8eb3b3de5014a8084d4",
      "old_mode": 33188,
      "old_path": "tests/test_browser.py",
      "new_id": "d6b7cff10c3022c83988c886f0b5120d51fcf087",
      "new_mode": 33188,
      "new_path": "tests/test_browser.py"
    }
  ]
}
