Thats pretty much what I'm doing, glad to know I'm on the right track!
_______________________________________
From: Andreas Ericsson [[email protected]]
Sent: Tuesday, August 25, 2009 2:36 AM
To: Nagios Developers List
Subject: Re: [Nagios-devel] Multithreaded Macro Support wrapper proposal
Steven D. Morrey wrote:
> The macro functions take almost no time. The problem is one of trying
> to use shared mutable global memory. It's not a problem unless more
> than 1 thread is trying to access the macros at once. Under that
> scenario thread A may delete a macro at the same time thread B is
> trying to read it. This causes segfaulting I was seeing earlier.
>
Well, you can update macros atomically without ever needing locking.
That would be the best solution by far for the global macros. Object
specific macros shouldn't be global in the first place, and should
really only be looked up on-demand, with the strings being returned
from their source (such as $HOSTNAME$ being taken from the immutable
host_object->host_name variable).
--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
---------------------------------------------------------------------------=
---
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus =
on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Nagios-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/lis ... gios-devel
NOTICE: This email message is for the sole use of the intended recipient(s=
) and may contain confidential and privileged information. Any unauthorized=
review, use, disclosure or distribution is prohibited. If you are not the =
intended recipient, please contact the sender by reply email and destroy al=
l copies of the original message.
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: ndreas Ericsson [[email protected]