Creation of extra RTHeartBeat threads in ThreadRegistry
I'm working on creating a threaded network listener, but I encountered something strange when running my project from the editor. I wanted to test if my threads are nicely cleaned-up after I shut down the thread. I found that I can check the ThreadRegistry to check which threads are active. However, I noticed that every time I run my application from the editor, two new threads are being created, making the number of threads grow. To check the number of threads, I added the following code to my BlueprintFunctionLibrary:
The declaration in the header looks like this:
In the level blueprint, I connected the BeginPlay and EndPlay events to my ShowThreadPool function. Each time I press Play, two new RTHeartBeat threads appear that don't seem to go away after stopping play. So for each run, the number of threads remains constant, but between plays, the number increases by two. I removed all my own threading code from the module and I still get this behavior. Is this intended behavior or is something not cleaned correctly? Since this also seems to appear in newly created projects, I'm guessing this is something inside the engine?
asked Jan 20 '15 at 01:44 PM in C++ Programming
Follow this question
Once you sign in you will be able to subscribe for any updates here