Threading bug
No edit summary
(Automatically adding template at the end of the page.)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Revision 12827 - 2021-01-19 ==
=== Revision 12827 - 2021-01-19 ===
The issue with disappearing ViewModel columns debug Fixed.
The issue with disappearing ViewModel columns debug Fixed.


This was really InAsyncThreadOrTheMainThreadInNonAsyncAppSoYouCanNeverGiveUp that sometimes was left to false for some parallel threads doing the file write - and this led to Enumerations that ran into longer locks gave up - returning fewer results than they had - and this led to file write wrote incomplete data.
This was really InAsyncThreadOrTheMainThreadInNonAsyncAppSoYouCanNeverGiveUp that sometimes was left to false for some parallel threads doing the file write. This led to Enumerations that ran into longer locks and gave up, returning fewer results than they had - and this led to how file write wrote incomplete data.


The reason for the Enumerations' ability to give up is UI. UI continues in an Async app and trusts that the Async thread eventually brings the missing data.
The reason for the Enumerations' ability to give up is UI. UI continues in an Async app and trusts that the Async thread eventually brings the missing data.
 
* This was probably also the issue behind the failing file saves from 2018 when it signaled failed and asked you to try again. This error was then wrongfully "fixed" leading to the much worse error of incomplete file writes (that is now fixed).
This was probably also the issue behind the failing file saves from last year when it signaled failed and asked you to try again - this error was then wrongfully "fixed" leading to this much worse error of incomplete file writes (that is now fixed).
 
To ensure your application is NOT in any way suffering from giving up iterations of lists due to temporary locks, always set the InAsyncThreadOrTheMainThreadInNonAsyncAppSoYouCanNeverGiveUp like this:
To ensure your application is NOT in any way suffering from giving up iterations of lists due to temporary locks, always set the InAsyncThreadOrTheMainThreadInNonAsyncAppSoYouCanNeverGiveUp like this:
  AsyncServiceSupportThreadInfo.InAsyncThreadOrTheMainThreadInNonAsyncAppSoYouCanNeverGiveUp = true; // thread is no longer uninteruptable
  AsyncServiceSupportThreadInfo.InAsyncThreadOrTheMainThreadInNonAsyncAppSoYouCanNeverGiveUp = true; // thread is no longer uninteruptable
Line 19: Line 17:
  }
  }
  [[Category:Debugging]]
  [[Category:Debugging]]
{{Edited|July|12|2024}}

Latest revision as of 15:48, 10 February 2024

Revision 12827 - 2021-01-19

The issue with disappearing ViewModel columns debug Fixed.

This was really InAsyncThreadOrTheMainThreadInNonAsyncAppSoYouCanNeverGiveUp that sometimes was left to false for some parallel threads doing the file write. This led to Enumerations that ran into longer locks and gave up, returning fewer results than they had - and this led to how file write wrote incomplete data.

The reason for the Enumerations' ability to give up is UI. UI continues in an Async app and trusts that the Async thread eventually brings the missing data.

  • This was probably also the issue behind the failing file saves from 2018 when it signaled failed and asked you to try again. This error was then wrongfully "fixed" leading to the much worse error of incomplete file writes (that is now fixed).

To ensure your application is NOT in any way suffering from giving up iterations of lists due to temporary locks, always set the InAsyncThreadOrTheMainThreadInNonAsyncAppSoYouCanNeverGiveUp like this:

AsyncServiceSupportThreadInfo.InAsyncThreadOrTheMainThreadInNonAsyncAppSoYouCanNeverGiveUp = true; // thread is no longer uninteruptable
public static class AsyncServiceSupportThreadInfo
{
  /// <summary>
  /// Will return true when called from a thread that is an active async-thread in an EcoSpace
  /// </summary>
  [ThreadStatic]
  public static bool InAsyncThreadOrTheMainThreadInNonAsyncAppSoYouCanNeverGiveUp = true; // in NonAsync apps - mainthread has same status as the async thread (un interuptable)
}
This page was edited 99 days ago on 02/10/2024. What links here