-
Notifications
You must be signed in to change notification settings - Fork 391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should remove synchronous block from LaunchSettingsProvider #1342
Comments
Note. Should import the ISpecialFilesManager and use that to get the app designer folder. |
We're unlikely to change this now and it's not causing any issues. |
It looks like the majority of entry points into LaunchSettingsProvider are async, so we should just flow this through. |
Generally, we should prevent using JTF.Run other than implementing old contracts (especially old COM/UI thread contracts). Using it inside a thread pool thread may cause thread pool exhaustion issues, and froze the process for half second without CPU activities. Sometime, it takes two threads in JTF.Run to trigger this problem. We saw this issue in Dev 14, and tried to reduce them in CPS. The reason is if you have code to block on thread pool and wait other async method to finish. Very often, the async method may require to run code in the thread pool to finish, so when the number of threads in this state reaches the number of thread pool threads, it will enter a virtual dead lock mode, until the thread pool manager to kick in and decide to add new threads to the pool. Thread pool manager only wakes up maybe every 250ms, we typically see it unblocked the pool after 500ms in dev 14. And we notice this type of issue randomly freezes IDE for short period of time, and very hard to reproduce. |
Yeah I'm seeing random freezes - I wonder if this is related. |
If you track CPU usage, in the thread exhaustion scenario, you will see large gaps with no activity.
…Sent from my phone
On May 18, 2017, at 6:02 PM, David Kean <notifications@github.com<mailto:notifications@github.com>> wrote:
Yeah I'm seeing random freezes - I wonder if this is related.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#1342 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ALGWwj8WlqjNBPxUdUlCEifE6E_4t0c5ks5r7OongaJpZM4LuLbH>.
|
I have a proposed fix here: #2317. I'm yet to run this through the mill yet - I plan on doing this tomorrow. |
Using synchronous calls within async blocks can cause threadpool exhausting. Should investigate removing the ExecuteSynchronously call in the code below:
The text was updated successfully, but these errors were encountered: