{"action":"created","issue":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/14464","repository_url":"https://api.github.com/repos/bitcoin/bitcoin","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/14464/labels{/name}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/14464/comments","events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/14464/events","html_url":"https://github.com/bitcoin/bitcoin/pull/14464","id":369125135,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyMTQxMDQz","number":14464,"title":"refactor: Remove boost in checkqueue","user":{"login":"ken2812221","id":11154118,"node_id":"MDQ6VXNlcjExMTU0MTE4","avatar_url":"https://avatars0.githubusercontent.com/u/11154118?v=4","gravatar_id":"","url":"https://api.github.com/users/ken2812221","html_url":"https://github.com/ken2812221","followers_url":"https://api.github.com/users/ken2812221/followers","following_url":"https://api.github.com/users/ken2812221/following{/other_user}","gists_url":"https://api.github.com/users/ken2812221/gists{/gist_id}","starred_url":"https://api.github.com/users/ken2812221/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ken2812221/subscriptions","organizations_url":"https://api.github.com/users/ken2812221/orgs","repos_url":"https://api.github.com/users/ken2812221/repos","events_url":"https://api.github.com/users/ken2812221/events{/privacy}","received_events_url":"https://api.github.com/users/ken2812221/received_events","type":"User","site_admin":false},"labels":[{"id":135961,"node_id":"MDU6TGFiZWwxMzU5NjE=","url":"https://api.github.com/repos/bitcoin/bitcoin/labels/Refactoring","name":"Refactoring","color":"E6F6D6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-10-11T13:36:52Z","updated_at":"2018-10-13T07:49:05Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/14464","html_url":"https://github.com/bitcoin/bitcoin/pull/14464","diff_url":"https://github.com/bitcoin/bitcoin/pull/14464.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/14464.patch"},"body":"This PR removes use of the following object in checkqueue\r\n- `boost::condition_variable`\r\n- `boost::mutex`\r\n- `boost::unique_lock`\r\n\r\nInstead of using `boost::thread_group::interrupt_all` to trigger `boost::thread_interrupted` exception, it should call `InterruptScriptCheck()` or `scriptcheckqueue.Interrupt()` to interrupt the checkqueue thread.\r\n\r\nAlso, it adds three functions:\r\n- `StartScriptCheck()`\r\n- `InterruptScriptCheck()`\r\n- `StopScriptCheck()`\r\n\r\nfor clearer logic for script check threads."},"comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments/429520051","html_url":"https://github.com/bitcoin/bitcoin/pull/14464#issuecomment-429520051","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/14464","id":429520051,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTUyMDA1MQ==","user":{"login":"ken2812221","id":11154118,"node_id":"MDQ6VXNlcjExMTU0MTE4","avatar_url":"https://avatars0.githubusercontent.com/u/11154118?v=4","gravatar_id":"","url":"https://api.github.com/users/ken2812221","html_url":"https://github.com/ken2812221","followers_url":"https://api.github.com/users/ken2812221/followers","following_url":"https://api.github.com/users/ken2812221/following{/other_user}","gists_url":"https://api.github.com/users/ken2812221/gists{/gist_id}","starred_url":"https://api.github.com/users/ken2812221/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ken2812221/subscriptions","organizations_url":"https://api.github.com/users/ken2812221/orgs","repos_url":"https://api.github.com/users/ken2812221/repos","events_url":"https://api.github.com/users/ken2812221/events{/privacy}","received_events_url":"https://api.github.com/users/ken2812221/received_events","type":"User","site_admin":false},"created_at":"2018-10-13T07:49:05Z","updated_at":"2018-10-13T07:49:05Z","author_association":"MEMBER","body":"```diff\r\ngit diff 9aacef638f0c2159930640762daf524942052a9d 68e50c8779ae94456ceace4d488b4f07e06e4ad7\r\ndiff --git a/src/checkqueue.h b/src/checkqueue.h\r\nindex 6d158ce99..015811f4d 100644\r\n--- a/src/checkqueue.h\r\n+++ b/src/checkqueue.h\r\n@@ -167,7 +167,7 @@ public:\r\n             std::lock_guard<std::mutex> lock(mutex);\r\n             interrupted = true;\r\n         }\r\n-        condMaster.notify_all();\r\n+        condMaster.notify_one();\r\n         condWorker.notify_all();\r\n     }\r\n\r\ndiff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp\r\nindex a3f01a6b3..fb51bf011 100644\r\n--- a/src/test/test_bitcoin.cpp\r\n+++ b/src/test/test_bitcoin.cpp\r\n@@ -118,8 +118,8 @@ TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(cha\r\n TestingSetup::~TestingSetup()\r\n {\r\n     InterruptScriptCheck();\r\n-    StopScriptCheck();\r\n     threadGroup.interrupt_all();\r\n+    StopScriptCheck();\r\n     threadGroup.join_all();\r\n     GetMainSignals().FlushBackgroundCallbacks();\r\n     GetMainSignals().UnregisterBackgroundSignalScheduler();"}}
{"actor":{"display_login":"ken2812221"}}