No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== Revision 12827 - 2021-01-19 == | == 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 | 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. | ||
The reason for | 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 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) | 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 | ||
public static class AsyncServiceSupportThreadInfo | public static class AsyncServiceSupportThreadInfo | ||
Line 18: | Line 18: | ||
public static bool InAsyncThreadOrTheMainThreadInNonAsyncAppSoYouCanNeverGiveUp = true; // in NonAsync apps - mainthread has same status as the async thread (un interuptable) | public static bool InAsyncThreadOrTheMainThreadInNonAsyncAppSoYouCanNeverGiveUp = true; // in NonAsync apps - mainthread has same status as the async thread (un interuptable) | ||
} | } | ||
[[Category:Debugging]] | [[Category:Debugging]] |
Revision as of 07:39, 14 March 2023
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 - 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.
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 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:
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) }