object_notify() and thread safety

$Adam's icon

Hi Developers,

does anyone know whether the 'listener' methods triggered by an object_notify() message would run in the same thread as the method that called the corresponding object_notify()? What I would like to achieve is to pass a std::vector as the data parameter of the object_notify() and when each listener finished dealing with the vector, I'd need to clear it. The question is whether I could simply call vector.clear() after object_notify() or if I should implement some mechanism that makes my caller thread wait until every listener finished dealing with the vector?

Thanks,
Ádám

Joshua Kit Clayton's icon

object_notify() is a synchronous operation.