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

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.

-- Markus
-----------------------------------------------------------
The power of accurate observation is
commonly called cynicism by those
who have not got it.  ~George Bernard Shaw
------------------------------------------------------------

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