_Rocket_
-
Posts
540 -
Joined
-
Last visited
-
Days Won
29 -
SteamID
76561198147511354
Reputation
656Single Status Update
-
This post is about programming, so feel free to skip this if you aren't interested lol.
I have actually come to really enjoy lambdas in C++. It's a lot like the anonymous function in Lua for those of you who only use GLua. I think lambdas shine the best for multi-threading. While I've been making the GFL game, I've needed to use multi-threading for better RNG and for the game to run more efficiently.
It's like this:
std::thread thread = std::thread([=] ()
{
//Do stuff
});It's pretty cool. It makes multi-threading in this language to be much less of a headache. I might find more use for lambdas in the future 😄
