I've looked through a whole range of different resources to understand queued tasks and the online support through GitHub and various videos (e.g. https://www.youtube.com/watch?v=9tQKOMoLa2w) just don't get me to a correct output.
I've got an add-in that uses tasks to perform various raster-based analysis functions. Here is an overview of the program:
- Main task starts
- Program gets a number of key locations (as vectors)
- Analysis creates a new raster using a listener with a concurrentQueue.
- A separate process calculates that new raster cell by cell, until it has calculated a value for all cells in the raster.
- The system continues to iterate through each location and sums all values for each calculation for each location into a composite raster.
The problem is that now I am trying to save a different raster for each location, as well as the composite raster and saving is done out of order. I think I have correctly created a means to store the individual and composite value separately by saving out the individual location raster once it is complete, then resetting that array and starting over. Meanwhile the composite raster array just keeps accumulating values. Yet, the individual rasters are saved after the composite raster and clearing the individual location raster does not seem to be working.
I have a decent amount of experience coding, but queues and sync functionality are new to me. I can't help but think something is awry with how saving and clearing the raster arrays work with tasks and queues. Anyone available to help with this?