Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortherzok <marius.ungureanu@xamarin.com>2019-05-30 17:56:20 +0300
committertherzok <marius.ungureanu@xamarin.com>2019-05-30 17:56:20 +0300
commit82c0fabd7c0edfa2f96121e2cc19b31305d3bd9d (patch)
tree991523ed3727a3fcbe5bb163b1add6c0e754f1af /main/src/addins
parent5fcab1a3e0a08573ce2ec457b6ff01f6ffb65c60 (diff)
[Mac] Use the main DispatchQueue when processing memory pressure events
Processing this on a background thread will cause an AppKit NSEventThread to spin up on a background thread, which would never finish running This thread would also be running at 100% CPU, causing a specific thread to loop and burn until the process ends Fixes VSTS #894581 - VS Mac processes still running after quitting the app? Fixes VSTS #802626 - [Feedback] VS usually consumes an entire CPU core when idle, killing battery life (and making my lap hot)
Diffstat (limited to 'main/src/addins')
-rw-r--r--main/src/addins/MacPlatform/MacPlatform.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/src/addins/MacPlatform/MacPlatform.cs b/main/src/addins/MacPlatform/MacPlatform.cs
index f8ae6b1d2c..f860333842 100644
--- a/main/src/addins/MacPlatform/MacPlatform.cs
+++ b/main/src/addins/MacPlatform/MacPlatform.cs
@@ -1360,7 +1360,7 @@ namespace MonoDevelop.MacIntegration
public MacMemoryMonitor ()
{
- DispatchSource = new DispatchSource.MemoryPressure (notificationFlags, DispatchQueue.DefaultGlobalQueue);
+ DispatchSource = new DispatchSource.MemoryPressure (notificationFlags, DispatchQueue.MainQueue);
DispatchSource.SetEventHandler (() => {
var metadata = CreateMemoryMetadata (DispatchSource.PressureFlags);