On 24/07/10 04:21, Markus Roberts wrote:
>> The thing is that a thread might do other thing requiring the known
>> resource types beside compiling (I don't know what, maybe a resource
>> indirection or sth). That's why I proposed to perform the cleanup when
>> the thread exits Puppet (or near this time).
> 
> There's no need to do it at exit, as all thread-var refs get cleared
> on exit anyway.

I wasn't talking about program exit or thread exit, I was thinking to
the case where the thread exits puppet to go back to a pool (keeping its
reference to known_resource_types).

> As for other processes using it, my current thinking is 1) I can't
> find any, 2) I don't know what they might be, 3) they should be
> harmless / caught by the present logic.  The only failure case I can
> think of would be if some process ran & cached the
> known_resource_types and then the thread sat idle for a long time,
> during which the files were changed on disk, and then a compile was
> done--the first compile on the thread would run with the old loaded
> types.  This seems pretty remote, but, if we want to account for it,
> putting the nullification at the top of compile (so we flush it before
> _and_ after each compile) would be safe & easy.

Yes, I think you're right, the current implementation should be more
than enough.
-- 
Brice Figureau
My Blog: http://www.masterzen.fr/

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to