compile exampels with threads too