User Tools

Site Tools


lambda_rules

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
lambda_rules [2013/11/09 04:59]
troyane
lambda_rules [2013/11/09 05:01] (current)
troyane
Line 1: Line 1:
 ====== Rules and arrangements using lambdas scheme for database access ====== ====== Rules and arrangements using lambdas scheme for database access ======
 +
 +===== General =====
  
   * Beware of recursive lambda calls.   * Beware of recursive lambda calls.
   * All database access must be applied in separate thread (''​TrackCollections''​ thread). So all database access must be wrapped into lambda (via ''​m_pTrackCollection->​callAsync/​callSync''​).   * All database access must be applied in separate thread (''​TrackCollections''​ thread). So all database access must be wrapped into lambda (via ''​m_pTrackCollection->​callAsync/​callSync''​).
 +
 +
 +===== Accessing GUI =====
 +
   * It is strictly prohibited to access GUI from lambda. GUI access must be be applied only from main thread.   * It is strictly prohibited to access GUI from lambda. GUI access must be be applied only from main thread.
  
Line 12: Line 18:
  
  
---- +===== Capture parameters ​=====
- +
-** Capture parameters ​** +
  
   * Understand the difference between Asynchronous and Synchronous calls. ​   * Understand the difference between Asynchronous and Synchronous calls. ​
Line 22: Line 26:
   
    
 +===== Example =====
  
- 
---- 
- 
- 
-**Example** 
  
 Please, take a look at ''​DlgMissing::​onShow()''​. Here we must disable button after calling ''​m_pMissingTableModel->​select();''​ Please, take a look at ''​DlgMissing::​onShow()''​. Here we must disable button after calling ''​m_pMissingTableModel->​select();''​
lambda_rules.txt · Last modified: 2013/11/09 05:01 by troyane