I recently asked about functional programs that have no side effects, and found out what it means to make parallelized tasks trivial. In particular, these “pure” functions make this trivial because they have no side effects.
I also recently studied LINQ and lambda expressions, as I have come across examples many times in StackOverflow involving an enumeration. This made me wonder if splitting an enumeration or loop can now be "easier" in C #.
Are lambda expressions "clean" enough to remove trivial parallelization? Maybe it depends on what you do with this expression, but can they be clean enough? Is it possible something like this is theoretically possible / trivial in C # ?:
- Break the cycle into pieces
- Run the stream to scroll through each fragment
- Run a function that does something with a value from the current loop position of each thread
For example, let's say I had a lot of objects in the game loop (since I was developing the game and thought about the possibility of several threads) and had to do something with each of them in each frame, pull it trivially? If you look at IEnumerable, it seems to be tracking the current position, so I'm not sure I can use regular general collections to enumerate the enumeration into “pieces”.
. , , . .NET , .. , , / , .