{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Localization/issues/250","repository_url":"https://api.github.com/repos/aspnet/Localization","labels_url":"https://api.github.com/repos/aspnet/Localization/issues/250/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Localization/issues/250/comments","events_url":"https://api.github.com/repos/aspnet/Localization/issues/250/events","html_url":"https://github.com/aspnet/Localization/issues/250","id":157305187,"number":250,"title":"Propagation across async/await boundaries","user":{"login":"gzak","id":817765,"avatar_url":"https://avatars.githubusercontent.com/u/817765?v=3","gravatar_id":"","url":"https://api.github.com/users/gzak","html_url":"https://github.com/gzak","followers_url":"https://api.github.com/users/gzak/followers","following_url":"https://api.github.com/users/gzak/following{/other_user}","gists_url":"https://api.github.com/users/gzak/gists{/gist_id}","starred_url":"https://api.github.com/users/gzak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gzak/subscriptions","organizations_url":"https://api.github.com/users/gzak/orgs","repos_url":"https://api.github.com/users/gzak/repos","events_url":"https://api.github.com/users/gzak/events{/privacy}","received_events_url":"https://api.github.com/users/gzak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-27T23:07:30Z","updated_at":"2016-06-01T01:21:14Z","closed_at":null,"body":"I noticed that the detected locale is ultimately simply [persisted on the current thread](https://github.com/aspnet/Localization/blob/dev/src/Microsoft.AspNetCore.Localization/RequestLocalizationMiddleware.cs#L127) for subsequent use. Thus, I would have expected there to be a `SynchronizationContext` of some kind which knows how to propagate the value from the current thread onto a new thread in case an `await` operator resumes the operation on a different thread than where the request began. However, to my surprise `SynchronizationContext.Current` is null, and I see no signs of an analogous mechanism anywhere else.\r\n\r\nHow is the detected locale's value getting propagated to new threads after `await` operators resume on different threads? Or is it not getting propagated?"},"comment":{"url":"https://api.github.com/repos/aspnet/Localization/issues/comments/222867665","html_url":"https://github.com/aspnet/Localization/issues/250#issuecomment-222867665","issue_url":"https://api.github.com/repos/aspnet/Localization/issues/250","id":222867665,"user":{"login":"pranavkm","id":174281,"avatar_url":"https://avatars.githubusercontent.com/u/174281?v=3","gravatar_id":"","url":"https://api.github.com/users/pranavkm","html_url":"https://github.com/pranavkm","followers_url":"https://api.github.com/users/pranavkm/followers","following_url":"https://api.github.com/users/pranavkm/following{/other_user}","gists_url":"https://api.github.com/users/pranavkm/gists{/gist_id}","starred_url":"https://api.github.com/users/pranavkm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranavkm/subscriptions","organizations_url":"https://api.github.com/users/pranavkm/orgs","repos_url":"https://api.github.com/users/pranavkm/repos","events_url":"https://api.github.com/users/pranavkm/events{/privacy}","received_events_url":"https://api.github.com/users/pranavkm/received_events","type":"User","site_admin":false},"created_at":"2016-06-01T01:21:14Z","updated_at":"2016-06-01T01:21:14Z","body":"@gzak - you're right - this does not work out of the box in NET45. However NET46 adresses this. I was told @davidfowl has a snippet to make this work in NET451."}}
{"actor":{"display_login":"pranavkm"}}