-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
Are partially loaded classes visible? #6
Comments
There are several thread-safety concerns addressed in the library. Some are solved with mutexes, others by using CRuby's Regarding autoloading, that safety is inherited from the thread-safety of The version of Ruby depends on a few things. We need that Also, the library assumes that |
BTW, since you're are working on TruffleRuby, it might be of your interest to know the test suite has a file with some Ruby compatibility properties. I need to add code comments to document how does the library depend on each one of them. Not sure if the suite is exhastive as of today, should do a pass. |
Right, I've forgot autoload will block other threads accessing the constant until it's fully loaded. Thanks for the answer. The 'Ruby compatibility properties' test is very useful thanks. I'll have look later how compatible we are. |
Very interestingly looking project! I am curios, does the thread-safety property also guaranty that no other thread will see partially loaded class? Consider thread A, which triggers loading of a file defining class C. Then can a thread B which evaluates constant C while A is still lading the file defining C see the class C partially defined? As I read the code I think it might happen. Did you consider providing thread-safety for this as well?
Why does the project require ruby 2.4 and above? Are there technical difficulties to make it work with older Ruby versions?
The text was updated successfully, but these errors were encountered: