# HG changeset patch # User Daniele Nicolodi # Date 1365437317 -7200 # Node ID 29b1aa89a34cec8d1be88e3ec9128400efe8086b # Parent ad40873feca1e75c8d4385aa47131df7885b8bf9 Disable the Start button when data acquisition thread is running This avoids the race condition encountered when data acquisition is re-started while waiting for the previous data acquisition thread to terminate. diff -r ad40873feca1 -r 29b1aa89a34c FXAnalyse.c --- a/FXAnalyse.c Mon Apr 08 18:05:53 2013 +0200 +++ b/FXAnalyse.c Mon Apr 08 18:08:37 2013 +0200 @@ -525,6 +525,7 @@ break; logmsg("Start"); + SetCtrlAttribute(panel, PANEL_STARTBUTTON, ATTR_DIMMED, TRUE); acquiring = 1; // start data provider thread @@ -555,6 +556,8 @@ CmtReleaseThreadPoolFunctionID( DEFAULT_THREAD_POOL_HANDLE, dataProviderThread); + SetCtrlAttribute(panel, PANEL_STARTBUTTON, ATTR_DIMMED, FALSE); + break; } return 0;