I’ve been working on a project to help autofill crossword grids which is computationally heavy so I’ve been using an Isolate to do that work, using the framework described in the isolate docs.
This works fine but oftentimes you want to stop this calculation and start a new one when new user input comes in, the user enters a new word into the grid for example, without having to wait for the first one to finish. I wasn’t able to come up with a way to stop the current calculation and start a new one mid way, so my idea is to have 1 long standing isolate that manages the messages from the Main Isolate and spawns a new isolate to do the calculation, then if a new message arrives it could kill that existing isolate and spawn a new one.
I was curious if the community had better ideas on how to handle a scenario like this where you don’t need an isolate to finish computing and instead restart, and also any tips or tricks on how anyone handles multiple isolates communicating before I dive in to trying to implement my idea.