logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Sun <fsu...@yahoo.com>
Subject Is the mutex used in AsyncAppender::close() wrong?
Date Mon, 11 Jul 2005 16:26:39 GMT
In following code,

synchronized sync(mutex);
aai->removeAllAppenders();

mutex is for append and dispatch threads to access rotate buffer.

And the mutex to protect adding and removing appenders from asyncappender is
aai->getMutex()

I removed above two lines and simple call removeAllAppenders(), which will call

synchronized sync(aai->getMutex());
aai->removeAllAppenders();

then resolve one dead lock problem. 

Is my approch correct?

Arnold, please declare the member functions virtual if possible, such as in
loggingevent class. why do you declare synchronize as not exportable? 

Thanks,

Frank







Mime
View raw message