Procházet zdrojové kódy

Annotate concurrency problem

Brandon Thetford před 1 rokem
rodič
revize
2642b0f042

+ 3 - 1
Terminal.Gui/View/Layout/ViewLayout.cs

@@ -1,4 +1,4 @@
-using System.ComponentModel;
+using System.ComponentModel;
 using System.Diagnostics;
 
 namespace Terminal.Gui;
@@ -553,6 +553,8 @@ public partial class View
     ///     The view that was found at the <praramref name="x"/> and <praramref name="y"/> coordinates.
     ///     <see langword="null"/> if no view was found.
     /// </returns>
+    // CONCURRENCY: This method is not thread-safe.
+    // Undefined behavior and likely program crashes are exposed by unsynchronized access to InternalSubviews.
     public static View? FindDeepestView (View? start, int x, int y, out int resultX, out int resultY)
     {
         resultY = resultX = 0;

+ 1 - 0
Terminal.sln.DotSettings

@@ -425,4 +425,5 @@
 	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=B0C2F2A1AF61DA42BBF270980E3DCEF7/Name/@EntryValue">Concurrency Issue</s:String>
 	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=B0C2F2A1AF61DA42BBF270980E3DCEF7/Pattern/@EntryValue">(?&lt;=\W|^)(?&lt;TAG&gt;CONCURRENCY)(\W|$)(.*)</s:String>
 	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=B0C2F2A1AF61DA42BBF270980E3DCEF7/TodoIconStyle/@EntryValue">Warning</s:String>
+	<s:Boolean x:Key="/Default/UserDictionary/Words/=unsynchronized/@EntryIndexedValue">True</s:Boolean>
 </wpf:ResourceDictionary>