Hello Comunity,
I have been developing an Unreal Engine Plugin using the zmq communication protocol.
For reference I have been using Ramas FRunnable Tutorial.
#include “FPupilMsgWorker.h”
FPupilMsgWorker* FPupilMsgWorker::Instance = nullptr;
FPupilMsgWorker::FPupilMsgWorker()
{
Thread = FRunnableThread::Create(this, TEXT("PupilMsgWorker"), TPri_BelowNormal);
}
I am sending data using an event
if (Confidence > 0.4f){
NewPupilDataEvent.Broadcast(&ReceivedGazeStructure);
}
Every time I close the server from which I receive the data the thread blocks at this function call
zmq::message_t topic;
SubSocket->recv(&topic);
I understand why the function call is blocked but I do not understand why it blocks the whole game. I also checked with the debugger that we are in another Thread.
Why is this blocking my main thread and what action can I take to avert this ?