{"action":"created","issue":{"url":"https://api.github.com/repos/CityOfZion/neo-sharp/issues/484","repository_url":"https://api.github.com/repos/CityOfZion/neo-sharp","labels_url":"https://api.github.com/repos/CityOfZion/neo-sharp/issues/484/labels{/name}","comments_url":"https://api.github.com/repos/CityOfZion/neo-sharp/issues/484/comments","events_url":"https://api.github.com/repos/CityOfZion/neo-sharp/issues/484/events","html_url":"https://github.com/CityOfZion/neo-sharp/pull/484","id":367398284,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwODQ3NTQ0","number":484,"title":"Remove IAsyncDelay from the BlockProcessor and some cleanup.","user":{"login":"aboimpinto","id":1231687,"node_id":"MDQ6VXNlcjEyMzE2ODc=","avatar_url":"https://avatars2.githubusercontent.com/u/1231687?v=4","gravatar_id":"","url":"https://api.github.com/users/aboimpinto","html_url":"https://github.com/aboimpinto","followers_url":"https://api.github.com/users/aboimpinto/followers","following_url":"https://api.github.com/users/aboimpinto/following{/other_user}","gists_url":"https://api.github.com/users/aboimpinto/gists{/gist_id}","starred_url":"https://api.github.com/users/aboimpinto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aboimpinto/subscriptions","organizations_url":"https://api.github.com/users/aboimpinto/orgs","repos_url":"https://api.github.com/users/aboimpinto/repos","events_url":"https://api.github.com/users/aboimpinto/events{/privacy}","received_events_url":"https://api.github.com/users/aboimpinto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-05T23:28:16Z","updated_at":"2018-10-05T23:34:19Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/CityOfZion/neo-sharp/pulls/484","html_url":"https://github.com/CityOfZion/neo-sharp/pull/484","diff_url":"https://github.com/CityOfZion/neo-sharp/pull/484.diff","patch_url":"https://github.com/CityOfZion/neo-sharp/pull/484.patch"},"body":"To remove the IAsyncDelay from the block processor was necessary to introduce the extra code in the block pool where to access the pool there is a two semaphores:\r\n\r\n1. for access the pool it self (ReaderWriterLockSlim)\r\n2. to notify who is using that some block was added to the block pool (ManualResetEventSlim)\r\n\r\nall the access to the collection is not guarded by the ReaderWriterLockSlim that represents a lock that is used to manage access to a resource, allowing multiple threads for reading or exclusive access for writing. \r\nhttps://docs.microsoft.com/en-us/dotnet/api/system.threading.readerwriterlockslim?view=netframework-4.7.2\r\n\r\nFor every block that is added the ManualResetEvent is set and who subscribe it will get notify. With this it's not necessary to have a loop with delay. Now the system can save resources from the loop and only when the block is added to the pool is when the process restart.\r\n\r\n#482 "},"comment":{"url":"https://api.github.com/repos/CityOfZion/neo-sharp/issues/comments/427525395","html_url":"https://github.com/CityOfZion/neo-sharp/pull/484#issuecomment-427525395","issue_url":"https://api.github.com/repos/CityOfZion/neo-sharp/issues/484","id":427525395,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzUyNTM5NQ==","user":{"login":"codecov[bot]","id":22429695,"node_id":"MDM6Qm90MjI0Mjk2OTU=","avatar_url":"https://avatars2.githubusercontent.com/in/254?v=4","gravatar_id":"","url":"https://api.github.com/users/codecov%5Bbot%5D","html_url":"https://github.com/apps/codecov","followers_url":"https://api.github.com/users/codecov%5Bbot%5D/followers","following_url":"https://api.github.com/users/codecov%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/codecov%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/codecov%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecov%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/codecov%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/codecov%5Bbot%5D/repos","events_url":"https://api.github.com/users/codecov%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/codecov%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-10-05T23:34:19Z","updated_at":"2018-10-05T23:34:19Z","author_association":"NONE","body":"# [Codecov](https://codecov.io/gh/CityOfZion/neo-sharp/pull/484?src=pr&el=h1) Report\n> Merging [#484](https://codecov.io/gh/CityOfZion/neo-sharp/pull/484?src=pr&el=desc) into [development](https://codecov.io/gh/CityOfZion/neo-sharp/commit/9b1dc960dbb305b94824fba10b609078a19e6c6a?src=pr&el=desc) will **decrease** coverage by `0.08%`.\n> The diff coverage is `56.75%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/CityOfZion/neo-sharp/pull/484/graphs/tree.svg?width=650&token=qxg2UtlOwX&height=150&src=pr)](https://codecov.io/gh/CityOfZion/neo-sharp/pull/484?src=pr&el=tree)\n\n```diff\n@@               Coverage Diff               @@\n##           development     #484      +/-   ##\n===============================================\n- Coverage        54.03%   53.94%   -0.09%     \n===============================================\n  Files              302      302              \n  Lines            12488    12494       +6     \n===============================================\n- Hits              6748     6740       -8     \n- Misses            5740     5754      +14\n```\n\n\n| [Impacted Files](https://codecov.io/gh/CityOfZion/neo-sharp/pull/484?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [...Sharp.Core/Blockchain/Processing/BlockProcessor.cs](https://codecov.io/gh/CityOfZion/neo-sharp/pull/484/diff?src=pr&el=tree#diff-c3JjL05lb1NoYXJwLkNvcmUvQmxvY2tjaGFpbi9Qcm9jZXNzaW5nL0Jsb2NrUHJvY2Vzc29yLmNz) | `100% <100%> (ø)` | :arrow_up: |\n| [...re/Models/OperationManger/BlockOperationManager.cs](https://codecov.io/gh/CityOfZion/neo-sharp/pull/484/diff?src=pr&el=tree#diff-c3JjL05lb1NoYXJwLkNvcmUvTW9kZWxzL09wZXJhdGlvbk1hbmdlci9CbG9ja09wZXJhdGlvbk1hbmFnZXIuY3M=) | `100% <100%> (ø)` | :arrow_up: |\n| [...c/NeoSharp.Core/Blockchain/Processing/BlockPool.cs](https://codecov.io/gh/CityOfZion/neo-sharp/pull/484/diff?src=pr&el=tree#diff-c3JjL05lb1NoYXJwLkNvcmUvQmxvY2tjaGFpbi9Qcm9jZXNzaW5nL0Jsb2NrUG9vbC5jcw==) | `60.6% <40.74%> (-14.91%)` | :arrow_down: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/CityOfZion/neo-sharp/pull/484?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/CityOfZion/neo-sharp/pull/484?src=pr&el=footer). Last update [9b1dc96...5173b96](https://codecov.io/gh/CityOfZion/neo-sharp/pull/484?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"}}
{"actor":{"display_login":"codecov"}}