object_notify() and thread safety

Aug 29, 2010 at 2:35pm

object_notify() and thread safety

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 theobject_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

#52036
Sep 7, 2010 at 11:51pm

object_notify() is a synchronous operation.

#186892

You must be logged in to reply to this topic.