-
Notifications
You must be signed in to change notification settings - Fork 160
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
SET_METHODS_OPERATION does not flush the methods cache. #2594
Comments
This is a bit tricky, because every thread has its own method cache -- so we can't just flush it in The simplest way to do that I can think of is to reset Next idea: each thread stores a copy of the bag ref to |
There is also a potential race issue in We can fix all of these together as follows: First we store a copy of Then we use this cache and method list throughout The worst thing that can happen is that while |
Implemented in PR #2604. Turns out it's even a bit easier than I thought, as the method cache is of course thread local, so reseting it from |
Fixes gap-system#2594 Also fixes FlushCaches().
Fixes #2594 Also fixes FlushCaches().
Observed behaviour
tests in #2521 fail in HPCGAP and I can't see how to rewrite the critical function to make them pass
Expected behaviour
There should be a way to flush the methods cache (of an operation and number of arguments)
when needed.
Copy and paste GAP banner (to tell us about your setup)
It seems (looking at INSTALL_METHOD_FLAGS in oper1.g for instance, that
SET_METHODS_OPERATION(oper,n,MakeReadOnlySingleObj(meths));
(after copying the old methods list into
meths
and editing it, should be the correct way to modify a methods list in HPCGAP, replacing editing it in-place and callingCHANGED_METHODS_OPERATION(oper,n);
but this doesn't work. Nothing inSET_METHODS_OPERATION
flushes the method cache.The text was updated successfully, but these errors were encountered: