Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(FACT-2390) Use thread local to check recursion #1890

Merged
merged 1 commit into from
Feb 21, 2020

Conversation

pcarlisle
Copy link

No description provided.

@@ -26,13 +26,13 @@ class Facter::Util::Fact
# @api private
def initialize(name, options = {})
@name = name.to_s.downcase.intern
@recursion_key = "facter_searching_#{@name}".intern

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this not a boolean to start?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we use it as a key to a value in the map of current thread vars. We don't change it to a boolean later, but rather the value it points to.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh oh oh wow, reading is hard 🤦‍♀

@puppetcla
Copy link

CLA signed by all contributors.

@mwaggett mwaggett merged commit f81a706 into puppetlabs:2.x Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants