Mercurial > hg > fxanalyse
diff FXAnalyse.c @ 105:29b1aa89a34c
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.
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Mon, 08 Apr 2013 18:08:37 +0200 |
parents | 675cb8d5e8a7 |
children | 2a9f8a811d87 |
line wrap: on
line diff
--- 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;