Download

Launching One single background thread?

Hi All,

I want to launch this home made dll into the background so as to not bother the running of the game itself. I have the dll execution itself working fine.
I do not want to spawn multiple processes from UE, in fact, the dll is itself spawning 8 or so threads. Just run the dll’s ‘main’ proc that has a continuous loop inside.

Of course I am checking out Ramas tutorial here but I was wondering if there is a simpler way, or simpler example anywhere that is more matching what I am thinking of?

EDIT: I actually got something working, or at least doing something right. I will have to figure out how to try to share a big chunk of data between the Dll and the UE game object. Rama, you are a pillar of this community! :slight_smile:

Also, does anyone know what I should be putting for the InStackSize in FRunnableThread::Create ?? My Dll is going to use a relatively large amount of memory, does it have to do with that? As I spotted a note in Rama’s wiki saying, “//windows default = 8mb for thread, could specify more” but I don’t know what he refers to?

Cheers

The stack size depends on the thread. If it’s minimal, you can go as low as 4k. 64k is pretty safe.

Stack space memory? or allocated? Allocated memory won’t impact the stack space needed. Stack space is consumed by function calls and the local variables created for each call.

Thank you, that gives me a better idea. The dll seems to run ok so far but ill better read up on stack space then!

Cheers