just::thread Support Forum

General Category => General Discussion about just::thread => Topic started by: kkerbel on July 27, 2012, 07:14:06 AM

Title: Lambda functions
Post by: kkerbel on July 27, 2012, 07:14:06 AM
Are they possible with this library?  Thanks.
Title: Re: Lambda functions
Post by: Anthony Williams on July 27, 2012, 08:30:04 AM
Yes, if your compiler supports lambda functions (e.g. MSVC2010, g++ 4.6) then you can use them with the library. e.g.

Code: [Select]
std::thread t(
    []{
        do_something();
        do_something_else();
    });
Title: Re: Lambda functions
Post by: kkerbel on July 28, 2012, 02:20:46 AM
Thanks!