{"action":"closed","issue":{"url":"https://api.github.com/repos/OfficeDev/Interop-MailSim/issues/36","labels_url":"https://api.github.com/repos/OfficeDev/Interop-MailSim/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/OfficeDev/Interop-MailSim/issues/36/comments","events_url":"https://api.github.com/repos/OfficeDev/Interop-MailSim/issues/36/events","html_url":"https://github.com/OfficeDev/Interop-MailSim/issues/36","id":106869709,"number":36,"title":"Need to avoid potential deadlocks with REST API providers","user":{"login":"v-am","id":13222863,"avatar_url":"https://avatars.githubusercontent.com/u/13222863?v=3","gravatar_id":"","url":"https://api.github.com/users/v-am","html_url":"https://github.com/v-am","followers_url":"https://api.github.com/users/v-am/followers","following_url":"https://api.github.com/users/v-am/following{/other_user}","gists_url":"https://api.github.com/users/v-am/gists{/gist_id}","starred_url":"https://api.github.com/users/v-am/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/v-am/subscriptions","organizations_url":"https://api.github.com/users/v-am/orgs","repos_url":"https://api.github.com/users/v-am/repos","events_url":"https://api.github.com/users/v-am/events{/privacy}","received_events_url":"https://api.github.com/users/v-am/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"v-am","id":13222863,"avatar_url":"https://avatars.githubusercontent.com/u/13222863?v=3","gravatar_id":"","url":"https://api.github.com/users/v-am","html_url":"https://github.com/v-am","followers_url":"https://api.github.com/users/v-am/followers","following_url":"https://api.github.com/users/v-am/following{/other_user}","gists_url":"https://api.github.com/users/v-am/gists{/gist_id}","starred_url":"https://api.github.com/users/v-am/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/v-am/subscriptions","organizations_url":"https://api.github.com/users/v-am/orgs","repos_url":"https://api.github.com/users/v-am/repos","events_url":"https://api.github.com/users/v-am/events{/privacy}","received_events_url":"https://api.github.com/users/v-am/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-09-16T21:40:44Z","updated_at":"2015-10-05T19:37:35Z","closed_at":"2015-10-05T19:37:35Z","body":"REST API providers for MailSim are based on asynchronous calls. The main logic of the MailSim is, however, completely synchronous. There are potential issues with mixing asynchronous and synchronous code in GUI applications (for instance, see http://blog.stephencleary.com/2012/07/dont-block-on-async-code.html). Basically, an async operation might try to run its completion callback on UI thread that itself waits for async operation completion. Though MailSim is not a GUI app, I think we should try to follow general recommendations that should help to avoid this issue.\r\n\r\nThe recommendation is to use API ConfigureAwait(false) with all asynchronous operations. "}}