decline-cookies / anvil-unity-dots

Unity DOTS and ECS specific additions and extensions to Anvil
MIT License
4 stars 1 forks source link

Task Driver - Support Cancel Unwind without DataStream #266

Open mbaker3 opened 1 year ago

mbaker3 commented 1 year ago

Add the ability to configure a TD to run unwind logic on ANY cancel requests received regardless of whether there is currently data in a stream.

This will allow us to perform cancel unwind logic even if the work is currently delegated out to a sub task driver.

This feature can't just be defined as a special behaviour when the key is present in EPD because not all Task Drivers store state in an EPD while work is delegated to a subtask.

The current workaround is to maintain a sentinel type job that just repeatedly reads and re-writes the same instance to a stream configured to unwind on each update so long as that key is still present. This is cumbersome and inefficient.