{"action":"created","issue":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/4336","repository_url":"https://api.github.com/repos/nim-lang/Nim","labels_url":"https://api.github.com/repos/nim-lang/Nim/issues/4336/labels{/name}","comments_url":"https://api.github.com/repos/nim-lang/Nim/issues/4336/comments","events_url":"https://api.github.com/repos/nim-lang/Nim/issues/4336/events","html_url":"https://github.com/nim-lang/Nim/pull/4336","id":160251275,"number":4336,"title":"Implement protection on callback environment.","user":{"login":"cheatfate","id":5955411,"avatar_url":"https://avatars.githubusercontent.com/u/5955411?v=3","gravatar_id":"","url":"https://api.github.com/users/cheatfate","html_url":"https://github.com/cheatfate","followers_url":"https://api.github.com/users/cheatfate/followers","following_url":"https://api.github.com/users/cheatfate/following{/other_user}","gists_url":"https://api.github.com/users/cheatfate/gists{/gist_id}","starred_url":"https://api.github.com/users/cheatfate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheatfate/subscriptions","organizations_url":"https://api.github.com/users/cheatfate/orgs","repos_url":"https://api.github.com/users/cheatfate/repos","events_url":"https://api.github.com/users/cheatfate/events{/privacy}","received_events_url":"https://api.github.com/users/cheatfate/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-06-14T18:27:53Z","updated_at":"2016-06-15T18:16:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nim-lang/Nim/pulls/4336","html_url":"https://github.com/nim-lang/Nim/pull/4336","diff_url":"https://github.com/nim-lang/Nim/pull/4336.diff","patch_url":"https://github.com/nim-lang/Nim/pull/4336.patch"},"body":"Just because RegisterWaitForSingleObject() performs waiting in other thread GC can free our callbacks' environment data. So we need to use \"brand new and undocumented\" methods \"system.protect() and system.dispose()\" from @Araq, to protect our callback environment from angry GC."},"comment":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/comments/226273769","html_url":"https://github.com/nim-lang/Nim/pull/4336#issuecomment-226273769","issue_url":"https://api.github.com/repos/nim-lang/Nim/issues/4336","id":226273769,"user":{"login":"Araq","id":287816,"avatar_url":"https://avatars.githubusercontent.com/u/287816?v=3","gravatar_id":"","url":"https://api.github.com/users/Araq","html_url":"https://github.com/Araq","followers_url":"https://api.github.com/users/Araq/followers","following_url":"https://api.github.com/users/Araq/following{/other_user}","gists_url":"https://api.github.com/users/Araq/gists{/gist_id}","starred_url":"https://api.github.com/users/Araq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Araq/subscriptions","organizations_url":"https://api.github.com/users/Araq/orgs","repos_url":"https://api.github.com/users/Araq/repos","events_url":"https://api.github.com/users/Araq/events{/privacy}","received_events_url":"https://api.github.com/users/Araq/received_events","type":"User","site_admin":false},"created_at":"2016-06-15T18:16:32Z","updated_at":"2016-06-15T18:16:32Z","body":"> but it was protected by GC_ref() and GC_unref() and not modified in foreign thread. Does GC leave this pointer alone, and dont try to free it?\r\n\r\nSeems fine."}}
{"actor":{"display_login":"Araq"}}