I have encountered with a problem with Parallel Pattern Library when using it along with MFC. I have a method class, wich responds to a button click:
add_to_in() and add_to_out() is a member fucntions of Ctest_taskDlg class, each of them prints a 10 000 symbols to a RichEdit control. A task_group tasks is a member of Ctest_taskDlg class too.Code:void Ctest_taskDlg::OnBnClickedButton1() { using namespace Concurrency; tasks.run([&]{add_to_in();}); tasks.run([&]{add_to_out();}); tasks.wait(); ::AfxMessageBox(_T("Done")); }
When I press the button, it executes only add_to_out() function, and then main window of an application is freezes.
What would cause this? Thanks in advance!



LinkBack URL
About LinkBacks


