More comprehensive recursion guard.#460
Conversation
topaz/executioncontext.py
Outdated
There was a problem hiding this comment.
This should be using the underlying strings, not the symbols.
lib-topaz/array.rb
Outdated
There was a problem hiding this comment.
Why the change in API from returning the the in_recursion value to yielding it to the block.
There was a problem hiding this comment.
I ran into a case where not letting the block decide what to do when recursion is detected made things difficult, but I'm not sure if that's an issue anymore.
|
Sorry, I'm still thinking this over :/ |
There was a problem hiding this comment.
No, but I need it for Array#hash in #456.
There was a problem hiding this comment.
I think this is becoming my official theme song, but let's split this up :D, so this just has the identifier for recursion guards.
There was a problem hiding this comment.
Should it have Thread.in_recursion_guard? as well? That's only used by the outer guard.
There was a problem hiding this comment.
Should have been more precise, just what's needed for the recursion_guard() changes.
Conflicts: tests/objects/test_threadobject.py topaz/objects/threadobject.py
|
This branch is very messy with all the merging and whatnot that's happened. If you prefer, I can make a clean one and just commit the final diff to it. |
This changes the behaviour of
Thread#recursion_guardand addsThread#recursion_guard_outerin order to allow more flexibility in how recursion is handled in Ruby code. In addition, recursion detection is now based on a function identifier rather being global to prevent nested guards from different functions interfering with each other.