Added management of critical sections
Added support of critical sections in lablqml
Remove unused generated files
fixed example to used threads