Some things are simply not meant to be run on separate threads.
The only thing you could do IMO is to use the Spread nodes that allows you to spread the work over multiple frames so the game thread doesn’t get blocked by executing entire task at once.
This is the reason that i implemented Spread nodes, to provide an alternative for tasks that can’t run on background threads or to be able to run tasks without blocking the game thread on devices that simply don’t have the possibility to run additional threads.
Redesigned the latent nodes and changed some node naming.
DoThreadTask now returns a worker reference which helps you to validate, cancel, wait for completion, check for completion or cancellation status.
Async Task nodes ( Do Loop 1D, Do Loop 2D, Do Loop 3D and Do Async Task) now return a task reference that helps you to validate, cancel, check for completion or cancellation status.
New **InGameThread **node which allows you to know whether you’re on the game thread or background thread.
New Thread safe LineTrace nodes
New DoAsyncTask node which acts like an infinite while.
New ResetRunaway and SetMaximumLoopIterations nodes that allow you to prevent breaking while and loop nodes when Runaway Loop Detected error occurs. These two nodes prevent the Runaway Loop Detected error to occur (check tutorials).
Fixed a bug where On Complete and On Cancel branches in Do Thread Task node were not guaranteed to execute on game thread (bug came in effect with version 1.2.0).
Editor module has been switched to Developer to allow MultiTask Pro to run in Editor Standalone mode
**UE4.24 **is now supported.
Due to some engine changes in UE 4.24 version, the colored nodes come with default colors until i will figure out how to fix that.
No other compatibility issue.
Multi task executes OnCancel Branch in DoThreadTask node when game ends(PIE, Standalone, Packaged etc). This allows you to prevent crashes in case you forget to cancel on End Play. However, you’re still responsible for OnCancel branch implementation in order to safely end the current work (if any).
Implemented **Sleep **function which allows you to put a thread to sleep for the amount of seconds.
Implemented DoParallelFor1D
Implemented DoParallelFor2D
Implemented DoParallelFor3D
Implemented Thread Safe Integer
Fixed **Mutex **which now has fixed functionality. It now Locks instead of trying the lock.
Various small code improvements and error texts fixing.
*** Multitask Pro ParallelFor functions are not suitable to work with dynamic size arrays. Arrays are not thread-safe. Since there are multiple-producers with ParallelFor Loops, Mutex doesn’t fix this. If you need a dynamic size container inside ParallelFor functions use Queues.
Multitask Pro ParallelFor functions are still experimental.**
Major changes to Latent Nodes that should bring more consistency and stability in your projects.
**ResetRunaway **is no longer an Experimental feature and is considered ready for production.
**SetMaximumLoopIterations **is no longer an Experimental feature and is considered ready for production.
**DoReadPixels **is no longer an Experimental feature and is considered ready for production.
Implemented only one type of Worker Reference structure for both Spread and Thread tasks.
Latent Nodes now make sure the caller object doesn’t get destroyed before finishing the job.
**ParallelFor **Nodes failed to pass further into development due to engine limitations. They got removed. The C++ implementation is still in place and you can find it here FMultiTaskProWorker::StartParallelFor in WorkerBase.h
This version has no backwards compatibility because it changes the way nodes get created and executed.
Please backup your project before switching to the newest version.
New Node **DoSpawnInstances **which allows you to spawn huge amounts of HISM instances without blocking the game thread https://youtube.com/watch?v=_8c1W15Yd34
Fixed a bug with WorkerReference where when the pointer to the worker would become invalid it would crash the editor when trying to access it.
Fixed a bug with Spread Nodes (DoAsyncTask, DoLoop1D, DoLoop2D, DoLoop3D) that was preventing correct branch selection when Cancelling and restarting the execution.