{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/30647782","id":30647782,"diff_hunk":"@@ -44,8 +44,10 @@ internal class AnalyzerExecutor\n         /// <param name=\"isCompilerAnalyzer\">Delegate to determine if the given analyzer is compiler analyzer. \n         /// We need to special case the compiler analyzer at few places for performance reasons.</param>\n         /// <param name=\"analyzerManager\">Analyzer manager to fetch supported diagnostics.</param>\n-        /// <param name=\"singleThreadedAnalyzerToGateMap\">Map from non-thread safe analyzers to unique gate objects. \n-        /// All analyzer callbacks for these analyzers will be guarded with a lock on the gate.\n+        /// <param name=\"getAnalyzerGate\">\n+        /// Delegate to fetch the gate object to guard all callbacks into the analyzer.\n+        /// It should return a unique gate object for the given analyzer instance for non-concurrent analyzers, and null otherwise.","path":"src/Compilers/Core/AnalyzerDriver/AnalyzerExecutor.cs","position":20,"original_position":20,"commit_id":"34d7cd7245fdca588677d09663db6a84151f49f2","original_commit_id":"34d7cd7245fdca588677d09663db6a84151f49f2","user":{"login":"JohnHamby","id":10982715,"avatar_url":"https://avatars.githubusercontent.com/u/10982715?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnHamby","html_url":"https://github.com/JohnHamby","followers_url":"https://api.github.com/users/JohnHamby/followers","following_url":"https://api.github.com/users/JohnHamby/following{/other_user}","gists_url":"https://api.github.com/users/JohnHamby/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnHamby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnHamby/subscriptions","organizations_url":"https://api.github.com/users/JohnHamby/orgs","repos_url":"https://api.github.com/users/JohnHamby/repos","events_url":"https://api.github.com/users/JohnHamby/events{/privacy}","received_events_url":"https://api.github.com/users/JohnHamby/received_events","type":"User","site_admin":false},"body":"Even concurrent analyzers will have some locking requirements, to prevent executing related actions concurrently. It might be prudent to always provide a gate object and just not use it for actions with no relatives, or we might need a rather different mechanism. (Actions unrelated to each other but each related to other actions can't be optimally managed with a single gate, and might need one gate per relationship.)\r\n\r\nIf a concurrent analyzer has no related actions, then it requires no gating and the comment and implied mechanism are fine as written.\r\n\r\nI guess I'm just claiming that more thought is necessary here, and mentioning concurrent analyzers might be misleading.","created_at":"2015-05-19T21:13:26Z","updated_at":"2015-05-19T21:13:26Z","html_url":"https://github.com/dotnet/roslyn/pull/2833#discussion_r30647782","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/2833","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/30647782"},"html":{"href":"https://github.com/dotnet/roslyn/pull/2833#discussion_r30647782"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/2833"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/2833","id":35568094,"html_url":"https://github.com/dotnet/roslyn/pull/2833","diff_url":"https://github.com/dotnet/roslyn/pull/2833.diff","patch_url":"https://github.com/dotnet/roslyn/pull/2833.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/2833","number":2833,"state":"open","locked":false,"title":"Guard against concurrent callbacks into analyzers in IDE","user":{"login":"mavasani","id":10605811,"avatar_url":"https://avatars.githubusercontent.com/u/10605811?v=3","gravatar_id":"","url":"https://api.github.com/users/mavasani","html_url":"https://github.com/mavasani","followers_url":"https://api.github.com/users/mavasani/followers","following_url":"https://api.github.com/users/mavasani/following{/other_user}","gists_url":"https://api.github.com/users/mavasani/gists{/gist_id}","starred_url":"https://api.github.com/users/mavasani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavasani/subscriptions","organizations_url":"https://api.github.com/users/mavasani/orgs","repos_url":"https://api.github.com/users/mavasani/repos","events_url":"https://api.github.com/users/mavasani/events{/privacy}","received_events_url":"https://api.github.com/users/mavasani/received_events","type":"User","site_admin":false},"body":"We need to do so for couple of scenarios:\r\n\r\n1.  Different diagnostic clients might end up requesting diagnostics at the same time and hence end up attempting to invoke into the same analyzer simultaneously.\r\n\r\n2. FixAll occurrences computes diagnostics in parallel, hence can causes concurrent callbacks. I plan to test that this doesn't drastically regress FixAll perf for common scenarios across large solutions, but am currently blocked by #2832","created_at":"2015-05-16T08:51:10Z","updated_at":"2015-05-19T21:13:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb02dc276f4b480728dccb3ac5e27605df91ee8d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/2833/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/2833/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/2833/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/34d7cd7245fdca588677d09663db6a84151f49f2","head":{"label":"mavasani:FixIDEAnalyzerConcurrency","ref":"FixIDEAnalyzerConcurrency","sha":"34d7cd7245fdca588677d09663db6a84151f49f2","user":{"login":"mavasani","id":10605811,"avatar_url":"https://avatars.githubusercontent.com/u/10605811?v=3","gravatar_id":"","url":"https://api.github.com/users/mavasani","html_url":"https://github.com/mavasani","followers_url":"https://api.github.com/users/mavasani/followers","following_url":"https://api.github.com/users/mavasani/following{/other_user}","gists_url":"https://api.github.com/users/mavasani/gists{/gist_id}","starred_url":"https://api.github.com/users/mavasani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavasani/subscriptions","organizations_url":"https://api.github.com/users/mavasani/orgs","repos_url":"https://api.github.com/users/mavasani/repos","events_url":"https://api.github.com/users/mavasani/events{/privacy}","received_events_url":"https://api.github.com/users/mavasani/received_events","type":"User","site_admin":false},"repo":{"id":30584055,"name":"roslyn","full_name":"mavasani/roslyn","owner":{"login":"mavasani","id":10605811,"avatar_url":"https://avatars.githubusercontent.com/u/10605811?v=3","gravatar_id":"","url":"https://api.github.com/users/mavasani","html_url":"https://github.com/mavasani","followers_url":"https://api.github.com/users/mavasani/followers","following_url":"https://api.github.com/users/mavasani/following{/other_user}","gists_url":"https://api.github.com/users/mavasani/gists{/gist_id}","starred_url":"https://api.github.com/users/mavasani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavasani/subscriptions","organizations_url":"https://api.github.com/users/mavasani/orgs","repos_url":"https://api.github.com/users/mavasani/repos","events_url":"https://api.github.com/users/mavasani/events{/privacy}","received_events_url":"https://api.github.com/users/mavasani/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mavasani/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":true,"url":"https://api.github.com/repos/mavasani/roslyn","forks_url":"https://api.github.com/repos/mavasani/roslyn/forks","keys_url":"https://api.github.com/repos/mavasani/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mavasani/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mavasani/roslyn/teams","hooks_url":"https://api.github.com/repos/mavasani/roslyn/hooks","issue_events_url":"https://api.github.com/repos/mavasani/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/mavasani/roslyn/events","assignees_url":"https://api.github.com/repos/mavasani/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/mavasani/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/mavasani/roslyn/tags","blobs_url":"https://api.github.com/repos/mavasani/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mavasani/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mavasani/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/mavasani/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mavasani/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/mavasani/roslyn/languages","stargazers_url":"https://api.github.com/repos/mavasani/roslyn/stargazers","contributors_url":"https://api.github.com/repos/mavasani/roslyn/contributors","subscribers_url":"https://api.github.com/repos/mavasani/roslyn/subscribers","subscription_url":"https://api.github.com/repos/mavasani/roslyn/subscription","commits_url":"https://api.github.com/repos/mavasani/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/mavasani/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/mavasani/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/mavasani/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/mavasani/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/mavasani/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mavasani/roslyn/merges","archive_url":"https://api.github.com/repos/mavasani/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mavasani/roslyn/downloads","issues_url":"https://api.github.com/repos/mavasani/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/mavasani/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/mavasani/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/mavasani/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mavasani/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/mavasani/roslyn/releases{/id}","created_at":"2015-02-10T09:12:41Z","updated_at":"2015-02-10T09:13:10Z","pushed_at":"2015-05-19T03:04:36Z","git_url":"git://github.com/mavasani/roslyn.git","ssh_url":"git@github.com:mavasani/roslyn.git","clone_url":"https://github.com/mavasani/roslyn.git","svn_url":"https://github.com/mavasani/roslyn","homepage":"","size":75010,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"c7ab77d0c29f910cb743af8471f98c92e917f67a","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":29078997,"name":"roslyn","full_name":"dotnet/roslyn","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":false,"url":"https://api.github.com/repos/dotnet/roslyn","forks_url":"https://api.github.com/repos/dotnet/roslyn/forks","keys_url":"https://api.github.com/repos/dotnet/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/roslyn/teams","hooks_url":"https://api.github.com/repos/dotnet/roslyn/hooks","issue_events_url":"https://api.github.com/repos/dotnet/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/roslyn/events","assignees_url":"https://api.github.com/repos/dotnet/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/roslyn/tags","blobs_url":"https://api.github.com/repos/dotnet/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/roslyn/languages","stargazers_url":"https://api.github.com/repos/dotnet/roslyn/stargazers","contributors_url":"https://api.github.com/repos/dotnet/roslyn/contributors","subscribers_url":"https://api.github.com/repos/dotnet/roslyn/subscribers","subscription_url":"https://api.github.com/repos/dotnet/roslyn/subscription","commits_url":"https://api.github.com/repos/dotnet/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/roslyn/merges","archive_url":"https://api.github.com/repos/dotnet/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/roslyn/downloads","issues_url":"https://api.github.com/repos/dotnet/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/roslyn/releases{/id}","created_at":"2015-01-11T02:39:03Z","updated_at":"2015-05-19T19:38:21Z","pushed_at":"2015-05-19T20:57:08Z","git_url":"git://github.com/dotnet/roslyn.git","ssh_url":"git@github.com:dotnet/roslyn.git","clone_url":"https://github.com/dotnet/roslyn.git","svn_url":"https://github.com/dotnet/roslyn","homepage":"","size":134887,"stargazers_count":2323,"watchers_count":2323,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":494,"mirror_url":null,"open_issues_count":846,"forks":494,"open_issues":846,"watchers":2323,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/2833"},"html":{"href":"https://github.com/dotnet/roslyn/pull/2833"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/2833"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/2833/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/2833/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/2833/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/34d7cd7245fdca588677d09663db6a84151f49f2"}}}}