How to safely access parameters from Task (Porting from Unity IJob)
I am making a program for generating a 3D mesh from parameters. The generation is done in some Tasks run with
Task.Run
Task.Run
. I'm struggling to grasp how to properly and safely access the parameters when generating.
I am porting the system over from Unity's IJob system, which I think is sort of 'boxing' my thinking in making it hard to get my head around what I need to do.
Do I make a class/struct that has all the parameters in it that I populate beforehand and use those values during generation? Sort of like Unity's Job system.