2
0
Эх сурвалжийг харах

Annotate concurrency problem

Brandon Thetford 1 жил өмнө
parent
commit
2642b0f042

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

@@ -1,4 +1,4 @@
-using System.ComponentModel;
+using System.ComponentModel;
 using System.Diagnostics;
 using System.Diagnostics;
 
 
 namespace Terminal.Gui;
 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.
     ///     The view that was found at the <praramref name="x"/> and <praramref name="y"/> coordinates.
     ///     <see langword="null"/> if no view was found.
     ///     <see langword="null"/> if no view was found.
     /// </returns>
     /// </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)
     public static View? FindDeepestView (View? start, int x, int y, out int resultX, out int resultY)
     {
     {
         resultY = resultX = 0;
         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/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/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: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>
 </wpf:ResourceDictionary>