xenadmin/XenAdmin
Callum McIntyre e77b8f9445 [CP-24974] Avoid calculatingVM agility/failure tolerance twice
This is caused by the `waitingNtolUpdate.waitOne()` call being at the end of the loop, not the beginning. The reason is that the `waitingNtolUpdate` is set during the first iteration (before the thread even gets loaded) - because the setter for Settings in this file sets it (and that's set by the setter for AssignPriorites.Connection, which is set in the HAWizard constructor). So when the thread first spawns we do the calculations, then get to the `waitOne` lock, which is set so we go back around the loop and calculate everything again before returning to the lock and waiting to be triggered. The correct behaviour is to trigger only once on the page load, and then only when re-triggered. To achieve that I've moved the `waitOne` call to the beginning of the loop, so that (assuming the `waitingNtolUpdate` lock is set before the thread is first started) we immediately run the calculations and then stop at the beginning of the loop waiting to be triggered again. This means that on page load (and after each re-trigger) we only calculate once.

The assumption that the lock is set before the thread is triggered is currently valid, because as mentioned above it's currently set by the setter for Settings which is indirectly called by the wizard constructor. I don't want to rely on that behaviour though because it's very indirect, so just to be safe I've added an explicit set just before the thread is triggered so that it's guaranteed to run the calculations the first time. This isn't strictly necessary but seems better than relying on the existing implicit setting. Since we use the same mechanism just in a different place, all the existing code that sets `waitingNtolUpdate` continues to trigger this thread as expected.
2017-10-06 14:07:31 +01:00
..
Actions Converted all extension get properties of the API classes to methods in order to 2017-09-03 03:35:30 +01:00
Alerts Merge remote-tracking branch 'upstream/REQ-67' 2017-10-04 14:40:01 +01:00
Commands CP-24477: Add licence check for CBT feature 2017-09-25 18:19:15 +01:00
ConsoleView Converted all extension get properties of the API classes to methods in order to 2017-09-03 03:35:30 +01:00
Controls [CP-24974] Avoid calculatingVM agility/failure tolerance twice 2017-10-06 14:07:31 +01:00
Core CA-267553: Fix offline XC showing up to date bug 2017-10-03 18:00:48 +01:00
Diagnostics Merge remote-tracking branch 'github_xenadmin/REQ-411' into master_REQ-411_merge 2017-09-29 11:56:46 +01:00
Dialogs Merge branch 'master' into REQ-230 2017-09-18 13:12:06 +01:00
Help CP-24344: Add HelpID and warning when disable CBT 2017-09-25 15:14:09 +01:00
HomePage
Images cp-21685/cp-22367: Linx/YinheKylin linux XenCenter ICON support 2017-06-07 21:01:01 +08:00
Network CA-243675: No Clear error message when proxy server which is configured is not running 2017-06-15 17:54:27 +01:00
Plugins Merge remote-tracking branch 'upstream/master' into CAR-2214 2017-01-24 14:46:57 +00:00
Properties L10N: Fix CA-255548 & translation updates (#1660) 2017-06-22 09:19:58 +01:00
RDP CA-247333 - Remove rdpclient6 code after April 2017 when it will become redundant 2017-06-14 17:22:42 +01:00
ReportViewer
ServerDBs
SettingsPanels Merge branch 'master' into REQ-230 2017-09-18 13:12:06 +01:00
TabPages Merge remote-tracking branch 'upstream/REQ-67' 2017-10-04 14:40:01 +01:00
TestResources Update credits 2017-02-24 16:49:16 +00:00
Utils
Wizards CA-268105: fix the bug where the pool item is disabled when an update is already installed on one host in the pool 2017-10-04 16:48:58 +01:00
Wlb Converted all extension get properties of the API classes to methods in order to 2017-09-03 03:35:30 +01:00
XenSearch Converted all extension get properties of the API classes to methods in order to 2017-09-03 03:35:30 +01:00
app.config CP-22471: Add information on XenCenter help usage to the user settings 2017-06-13 13:42:26 +01:00
app.manifest CA-261107: Metadata file osVersion is showing same value for XenCenter on different windows versions 2017-08-18 13:40:36 +01:00
Branding.cs CA-259276: Error when trying to install an update via JA XenCenter 2017-07-06 14:16:06 +01:00
GroupingTag.cs
HomePage.ja.mht
HomePage.mht
HomePage.zh-CN.mht
Images.cs Converted all extension get properties of the API classes to methods in order to 2017-09-03 03:35:30 +01:00
IMainWindow.cs
LicenseTimer.cs Converted all extension get properties of the API classes to methods in order to 2017-09-03 03:35:30 +01:00
MainWindow.cs Converted remaining extension get and set properties of the API classes to methods 2017-09-05 02:15:38 +01:00
MainWindow.Designer.cs CP-24344: Add "Disable CBT" menu item under VM 2017-09-08 14:03:54 +01:00
MainWindow.ja.resx CA-258782 Remove thin provisioning code (#1728) 2017-08-22 16:40:08 +01:00
MainWindow.resx CP-24344: Fix and refactor CBT implementation 2017-09-11 14:41:36 +01:00
MainWindow.zh-CN.resx CA-258782 Remove thin provisioning code (#1728) 2017-08-22 16:40:08 +01:00
MainWindowTreeBuilder.cs Converted all extension get properties of the API classes to methods in order to 2017-09-03 03:35:30 +01:00
OrganizationalView.cs
PasswordsRequest.cs
PowerManagment.cs
Program.cs CP-20918: Remove proxy authentication registry key (#1440) 2017-02-13 20:28:35 +00:00
Settings.cs CP-22472: Add new XenCenter metadata file to the server status report 2017-07-03 17:25:04 +01:00
SettingsUpdate.cs CA-176169: Added copyright statement to files which it was missing from 2017-01-16 20:14:56 +00:00
UpdateManager.cs
UpdateManager.DelayCalculator.cs
WinformsXenAdminConfigProvider.cs Renamed method so it's more obvious what it does. 2017-09-03 03:35:23 +01:00
XCPluginSchema.xsd
XenAdmin.csproj Merge remote-tracking branch 'upstream/REQ-67' 2017-10-04 14:40:01 +01:00
XenAdmin.rc