Skip to content

H4DC0R3/UE5-Blueprint-Multithread

 
 

Repository files navigation

Blueprint multi-threading

Congratulations. This plugin is designed to use multi-threading in blueprints. I do not claim that this is the best solution, but the plugin can grow and develop with you. I would appreciate your feedback.

Below you will find the functionality.

Nodes

Async nodes

Latent nodes have their own regular counterpart so that they can be called in functions. As you can see, there are 2 types of nodes. 1 has only one output (input), and two outputs (outputs). In the 1st case, it is the launch of logic in the game thread, which is needed to call changes from another thread. In the case of two outputs: one runs the logic in another thread, after this code is executed, the logic in the game thread will be called. Such a node is needed to do some heavy calculations in another thread, and to remove this load from the main thread, and then apply the necessary changes to the game thread.

image

Development/test nodes

The main purpose of these nodes is testing. Get thread - displays the name of the thread on which the node was executed (and prints to the log). Sleep thread - puts the thread to sleep, allows you to simulate a heavy load on the thread, so you can check whether it will affect the game thread.

image

ParallelFor

Implementation of Parallel For has been added, which will allow you to perform calculations for a large amount of data by spreading the load across different threads.

image

Class

Threaded actor component

image

On Begin, play creates its own thread that does not affect the game thread in any way. To execute logic in this thread, you need to use a special event. The name of the stream is assigned the name Actor.

image image

Atomic container

New nodes have been created that allow you to create absolutely any atomics variables. They automatically pull up the variable type when you connect it. It also has Queue, a thread safe linked list.

image

Thread pool

allows you to create a pool of a certain number of threads, and then add tasks that will be executed on these threads depending on their load.

image

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 94.2%
  • C# 5.8%