Download

Multi-threading in Blueprint

Update October 2017

After around a year i came back to this project to finish and publish it. It has been a hard year for me and additionally i had to learn a lot about the ue4 system and update my code constantly with massive changes Epic introduces on how threads should and will run

New features added :

thread safe counters
thread safe booleans
and massive changes for performace and stability of the code

Update!!!
I have just finished testing on Mac, and the plugin works perfectly, so I have updated my whitelist.
Theoretically it should work on both android and IOS but I do not have the device neither time to test it for now.

I have submitted the application for the market place and now am waiting for the response but most probably it will come in January.
But don’t worry in case it was not considered as a good content for the marketplace then I’ll publish the plugin in github for free :wink:
cheers


I have prepared some tutorials and some screenshots in case you wanna have a look.
Link to screen shots of plugin nodes
Link to video tutorials

Hi Everyone,

I am working on a plugin that will give the possibility of multi-threading in blueprint.
so far I can Create and Run threads using blueprint.

I have some questions to ask from you all :
1 - do you want to have such a plugin at all ? do you think anyone will use it ?
2 - Beside creating and running threads, what other functionalities do you want such plugin to offer ?
3 - do you think anyone would pay for such plugin ( I am sorry but I am in need of money ) I was thinking to put it to market place for max 5 euros, is it a fair price in your opinion ?

  1. YES!!! :stuck_out_tongue: I’ll use it
  2. Maybe some simple things like in c# there’s things like ThreadAlive, IsBackground, Name(get/set), maybe priority, thread sleep, abort ect
  3. Sounds OK to me ofc I’m sure people would prefer free but that’s a fair price :slight_smile:

Cool. thanks, and happy if it is going to be of any help.

All the functionality you mentioned is already implemented and working. additionally you will be able to suspend the thread and continue it again.
I am now working on a thread management system to add to the plugin so you can handle all the thread you are making as well.
I am planning to finish the thread-management system by the end of this week and then I will create a a short video and share it here

PS: just that I have doubt about implementing locks, am still thinking about it

So far the plugin is finished, I am just heavily testing it to make sure there is no memory leak and it won’t crash

I have prepared some tutorials and some screenshots in case you wanna have a look.
Link to screen shots of plugin nodes : https://drive.google.com/drive/folders/0BzZXeo6Wml1IeE5wTnJQSnNobE0
Link to video tutorials : https://drive.google.com/open?id=0BzZXeo6Wml1IeW9zSk94bjhnd0k

The plugin would be awesome. As for the price, I’m not sure if UE4 marketplace is priced in euro or in dollars, or how they convert the prices, especially concerning various local taxes. Five euro would be amazing, but I somehow doubt it would be the final price… conversion rates plus local taxes will probably up it :frowning:

I’m not currently doing games at a level that would require threading, but if you made this available on the marketplace I could easily see spending $20 on it just to keep it on hand for the future.

Hey there,

tell me if you want this to be moved to the Work-In-Progress Subforum or the Subforum for Community Projects (Free Projects/Plugins etc for the Community).

The Blueprint section is also okay, but most likely used for questions and not showcasing.
You would get more attention in the correct subforum.

Work in progress is good as well. whatever you suggest, I am okay with. Honestly I don’t have so much experience in choosing the channel so if you think it would be better then I up for it :slight_smile: . Thanks

I moved it to “Work In Progress” and left a redirect in the Blueprints Subforum for 2 days (if someone searches your post).
Once your Plugin is ready and you decided on what you want to do with it, either create a new thread or ping a moderator to
move the thread again.

Cheers!

EDIT: I also went ahead and adjusted your Thread title and gave the thread the “Plugin” prefix.

Any updates on this? It seems that it was submitted in January, did it get accepted?

I am interested in this as well. Any updates?

???

Hi everyone
sorry for such a long delay. I did not have time at all to work on this project but now i am back to this
part of the reason I have abandoned the project for a while was the limitation and changes between the platforms but now I have finally finished addressing all. unfortunately I had to abandon providing some functionalities but at least I have provided some new ones.

In less than a month I will publish the plugin on the market place. the first phase I can only manage to test and finalize on macOs and Windows, but ideally it should work on every platform

Exciting news : I have made blueprints for atomic boolean and atomic counters as well and you can enjoy the full power of multithreading and cross-blueprint multithreading

No this is another plugin it has massive differences with the one i am working on

The only issue that now i am still working on is that in case user makes an infinite loop and stop the play how to handle not to get a crash.

Hey Plangton,

You have my interest :slight_smile:

Keep us in the loop on your progress.

Cool to see people are still interested.
I managed to fix all the issue and now i am doing stability tests. I have solved the problem of the infitie loops but unfortunately it’s gonna be user dependent
here is the description

Problem : your thread is in a loop and not finished the jos and you try to kill the thread but basically nothing happens.

Reason : Unreal does not actually kill any thread, the function Kill(false/true) simply triggers another function named “Stop()” which user have to implement the logic for breaking the loop in this function

Unfortunately I can’t do much for this beside ensuring that it will definitely be called.
the main issue is when you stop the game or editor game, cause it ends up deleting the blueprints and then the thread can’t call the stop function. for this I made sure I shutdown all the thread while the execution is still in the EndGame cause EndGame happens before class destructor and therefore custom Stop function can be called.

Im also really interested in this, message me if you need testers for this (non commercial of course)!

The problem that i have been facing for the past three month is the inconsistent garbage collector of UE4. honestly it is not working in the best way possible.
the problem I am dealing with so far : blueprint gets deleted, the thread might be in the middle of it’s execution, and this will cause a crash.

I have not been working on this plugin for the past 2 month due to work load, but i am planning to spend my christmas holidays on it :stuck_out_tongue:

Hello,

Mumtithreading and Blueprints are now available with BPThreads Plugin (5$ only).