I have
DECLARE_EVENT_TwoParams(MNode, FCanBranchEvent, typename ElementType&, bool&)
FCanBranchEvent CanBranchEvent;
I have the event bound using the following:
node->OnCanBranch().AddRaw(this, &MWorldOctreeElement::CanBranch);
Note: node is a pointer to an instance of the class and OnCanBranch()
just returns a reference to CanBranchEvent
.
The event is only ever called from another thread using:
CanBranchEvent.Broadcast(Element, can_branch);
The issue that I am having is that when ever calling this and other events from a thread that is not the game thread, my game thread takes a huge performance hit. Even though, I am calling from a separate thread, are my bound functions running on the game thread?