MultiTask Pro

MultiTaskPro enables multi-threading in Blueprints in the cleanest and the most efficient way.

Create threaded or Async tasks using intuitive nodes.

Keep your blueprints simple with MultiTask Pro.

Synchronize your workflow using ThreadSafe Booleans, Mutex and Queues.

Tutorials:

https://www.youtube.com/playlist?lis…J_zcr16DsuU6lh

Should you require additional Queue Types, please do tell. Technical Details

Features:

  • Create Async Tasks
  • Create Threaded Tasks
  • ThreadSafe Booleans
  • Mutex
  • FVector Queue
  • FIntVector Queue
  • FIntPoint Queue
  • FTransform Queue
  • Float Queue
  • Int32 Queue
  • Int64 Queue
  • Actor Queue
  • Object Queue
  • FString Queue
  • FText Queue
  • FName Queue
  • Multi-Dimensional For Loops spread across multiple frames
  • NumberOfCores(returns cores number of the system)
  • Prevent Runaway Loop Detection
  • Thread safe line traces
  • Ability to Async read pixel data from UTextureRenderTarget2D and UTexture2D
  • ThreadSafe Integers
  • Sleep
  • DoSpawnInstances

https://www.unrealengine.com/marketplace/multitask-pro

Update 1.1

Added 3 new nodes:

  • Spread Loop 1D
  • Spread Loop 2D
  • Spread Loop 3D

These new nodes allow you to spread Multi-Dimensional(up to 3D) For Loops across multiple frames without any hassle.

Operations can be easily canceled and restarted at any given point in time.

​​​​​​​Since the loops are done on C++ side back end, you wont reach the Blueprint Max iterations limit.

Should you have any issues or requests, please let me know.

Update 1.1.1

  • Added compatibility for MacOS
  • Added compatibility for Android
  • Added compatibility for IOS

Should you have any issues or requests, please let me know.

Thanks! Can you advise a trick, how can you spawn, update material or any render pass changes, acync without crashes?

Hi,

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.

Update 1.1.3

  • Fixed a bug where DoAsyncTask could start another task even if it was already running.
  • All Nodes are following same model. This enables for easier implementation of further functionalities.
  • Implemented FString Queue type
  • Implemented FText Queue type
  • Implemented FName Queue type

Should you have any issues or requests, please let me know.

Update 1.1.8 is Live!

  • Various code cleanups
  • Added compatibility with Linux, Xbox One and Playstation
  • New node NumberOfCores(returns cores number of the system)

Update 1.2.0 is Live!

  • 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).
  • Nodes color coding
  • Various code optimizations

Update 1.2.1 is Live!

  • 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
  • Various code cleanup and improvements

**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.

Update 1.2.4 is Live!

  • Removed colored nodes from all versions (You need to re-add the nodes in your blueprints in UE 4.22 and 4.23!)
  • Ability to Async read pixel data from UTextureRenderTarget2D and UTexture2D (This executes on RenderThread.)
  • Small code improvements.

Multi Task Pro 1.2.5 is Live! (01/28/2020)

  • 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).
  • Minor code improvements.

**Update 1.2.6 is Live! **(05/04/2020)

  • 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.**

Update 1.3.0 is Live!

  • Replication friendly
  • 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.

Update 1.3.2 is Live!

  • 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.

Multi Task Pro 1.3.4 is Live!

  • Fixed a bug that prevented canceling a thread task.

Multi Task Pro 1.3.5 is Live!

  • Implemented new function NumberOfCoresIncludingHyperthreads
  • Implemented TryLock for Mutexes

Multi Task Pro 1.3.6 is Live! (08/04/2020)

  • Fixed a bug with Spread Nodes (DoAsyncTask, DoLoop1D, DoLoop2D, DoLoop3D) that was preventing correct branch selection when Cancelling and restarting the execution.