{"action":"created","issue":{"url":"https://api.github.com/repos/minetest/minetest/issues/6689","repository_url":"https://api.github.com/repos/minetest/minetest","labels_url":"https://api.github.com/repos/minetest/minetest/issues/6689/labels{/name}","comments_url":"https://api.github.com/repos/minetest/minetest/issues/6689/comments","events_url":"https://api.github.com/repos/minetest/minetest/issues/6689/events","html_url":"https://github.com/minetest/minetest/pull/6689","id":276855020,"number":6689,"title":"Shut down mapgen threads before other shutdown tasks","user":{"login":"raymoo","id":5734399,"avatar_url":"https://avatars3.githubusercontent.com/u/5734399?v=4","gravatar_id":"","url":"https://api.github.com/users/raymoo","html_url":"https://github.com/raymoo","followers_url":"https://api.github.com/users/raymoo/followers","following_url":"https://api.github.com/users/raymoo/following{/other_user}","gists_url":"https://api.github.com/users/raymoo/gists{/gist_id}","starred_url":"https://api.github.com/users/raymoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raymoo/subscriptions","organizations_url":"https://api.github.com/users/raymoo/orgs","repos_url":"https://api.github.com/users/raymoo/repos","events_url":"https://api.github.com/users/raymoo/events{/privacy}","received_events_url":"https://api.github.com/users/raymoo/received_events","type":"User","site_admin":false},"labels":[{"id":73368996,"url":"https://api.github.com/repos/minetest/minetest/labels/@%20Mapgen","name":"@ Mapgen","color":"009800","default":false},{"id":73368921,"url":"https://api.github.com/repos/minetest/minetest/labels/@%20Server%20/%20Client%20/%20Env.","name":"@ Server / Client / Env.","color":"009800","default":false},{"id":372290178,"url":"https://api.github.com/repos/minetest/minetest/labels/Bugfix","name":"Bugfix","color":"00cc99","default":false},{"id":336502596,"url":"https://api.github.com/repos/minetest/minetest/labels/One%20approval","name":"One approval","color":"207de5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-11-26T20:45:01Z","updated_at":"2017-11-29T19:49:15Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/minetest/minetest/pulls/6689","html_url":"https://github.com/minetest/minetest/pull/6689","diff_url":"https://github.com/minetest/minetest/pull/6689.diff","patch_url":"https://github.com/minetest/minetest/pull/6689.patch"},"body":"Fixes #6680.\r\n\r\nAlso stops mapgen threads before calling `register_on_shutdown` callbacks, in case something modified by mapgen threads are saved in the shutdown callback.\r\n\r\nI only tested that no mapgen callbacks run after the shutdown callbacks. I did not test the functionality of ModStorage threads in mapgen callbacks, but if it is available in shutdown callbacks, and shutdown callbacks happen after the mapgen threads finish, then it should be available in mapgen too. Here is the code I used to test:\r\n```\r\nlocal bob = false\r\n\r\nminetest.register_on_shutdown(function()\r\n        bob = true\r\nend)\r\n\r\nminetest.register_on_generated(function()\r\n        if bob then\r\n\t\tprint(\"MEMES!!!!\")\r\n        else\r\n                assert(false)\r\n        end\r\nend)\r\n```\r\nTo test, play a map a few times with the mod, running Minetest from the command line, and make sure to go somewhere that the map will be generated. If you see the message at least once, the fix didn't work."},"comment":{"url":"https://api.github.com/repos/minetest/minetest/issues/comments/347975425","html_url":"https://github.com/minetest/minetest/pull/6689#issuecomment-347975425","issue_url":"https://api.github.com/repos/minetest/minetest/issues/6689","id":347975425,"user":{"login":"raymoo","id":5734399,"avatar_url":"https://avatars3.githubusercontent.com/u/5734399?v=4","gravatar_id":"","url":"https://api.github.com/users/raymoo","html_url":"https://github.com/raymoo","followers_url":"https://api.github.com/users/raymoo/followers","following_url":"https://api.github.com/users/raymoo/following{/other_user}","gists_url":"https://api.github.com/users/raymoo/gists{/gist_id}","starred_url":"https://api.github.com/users/raymoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raymoo/subscriptions","organizations_url":"https://api.github.com/users/raymoo/orgs","repos_url":"https://api.github.com/users/raymoo/repos","events_url":"https://api.github.com/users/raymoo/events{/privacy}","received_events_url":"https://api.github.com/users/raymoo/received_events","type":"User","site_admin":false},"created_at":"2017-11-29T19:49:15Z","updated_at":"2017-11-29T19:49:15Z","author_association":"CONTRIBUTOR","body":"Addressed @rubenwardy's comment."}}
{"actor":{"display_login":"raymoo"}}