From 8d0a174a86d29dbec6412cb1bd38f87b3b3c059b Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 8 Jan 2008 13:37:19 +0000 Subject: - first implementation of "disk" queue mode finished. It still needs some work and the deserializer needs also to be expanded, but the queue at least performs well now. - fixed a race condition that could occur when input modules were terminated --- msg.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'msg.c') diff --git a/msg.c b/msg.c index 3e34ac1c..ca9678b2 100644 --- a/msg.c +++ b/msg.c @@ -2122,6 +2122,18 @@ rsRetVal MsgSetProperty(msg_t *pThis, property_t *pProp) #undef isProp +/* This is a construction finalizer that must be called after all properties + * have been set. It does some final work on the message object. After this + * is done, the object is considered ready for full processing. + * rgerhards, 2008-07-08 + */ +static rsRetVal MsgConstructFinalizer(msg_t *pThis) +{ + MsgPrepareEnqueue(pThis); + return RS_RET_OK; +} + + /* Initialize the message class. Must be called as the very first method * before anything else is called inside this class. * rgerhards, 2008-01-04 @@ -2129,6 +2141,7 @@ rsRetVal MsgSetProperty(msg_t *pThis, property_t *pProp) BEGINObjClassInit(Msg, 1) OBJSetMethodHandler(objMethod_SERIALIZE, MsgSerialize); OBJSetMethodHandler(objMethod_SETPROPERTY, MsgSetProperty); + OBJSetMethodHandler(objMethod_CONSTRUCTION_FINALIZER, MsgConstructFinalizer); /* initially, we have no need to lock message objects */ funcLock = MsgLockingDummy; funcUnlock = MsgLockingDummy; -- cgit v1.2.3