Trigger Event on Multithread

I want to use another thread to listen to other device’s socket data receiving,the thread may wait for the data to receive. I tried using 's
Multi-Threading: How_to_Create_Threads_in_UE4
to do some easy calculations,
and it succeed. Could any one give me some suggestion on how to call customized event on thread?

Can you say how you want to call function/event? which thread should execute that function?

I wanted to make the FRunnable thread wait for data from a server and utilize the data to the game as soon as it becomes available as for I don’t want to let the game main thread check for this frequently.

Do I need to let the AActor class inherit from the FRunnable class? Or some mechanism can let me call the event within the Run() function I implement?

You can’t communicate with UObjects from diffrent thread so you can’t make it runnable. You could try using delegates but i’m not sure if this gonna work. If you trying to communicate with HTTP then use HTTP module APIs insted, it already have implemented multithreading, looking on source it does checking via ticking.

Ticking is not bad as it might look CPUs now days is very very fast and if you check if result varable is accessable as delivered form other thread it technically nothing for it it won’t take even 1ms