-
Notifications
You must be signed in to change notification settings - Fork 45
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
Sychronization in behavior #1014
Comments
You could declare multiple times a I understand that from your code, we are almost sure that there is no possible parallel execution because there is only one But, because your behavior is not declared as Unfortunatelly, if you add the Keep in your mind that the synchronization issues that are generated by the SARL compiler are warnings (should be considered, could be ignored). We plan to remove them in one of the coming versions (see Issue #208). I keep this issue open in order to:
|
see #1014 Signed-off-by: Stéphane Galland <[email protected]>
Description of your issue:
Suppose this code:
I get the "The field teamRoles should be synchronized for avoiding value inconsistency due to parallel execution"
My understanding is that each
B_Coordinator
behaviour is different for each agent when attaching it to an agent, so they do not share the sameteamRoles
and there could be no problems due to || executions. And of course a behavior can only be initialized once right?So shouldn't be the case that the
Initialize
of behaviors shold never rise these warnings as they are by definition executed once? Maybe I am not understanding soemthingSystem configuration:
-- SARL version: 0.10.0
-- SARL compiler: 0.10.0
-- Java JDK version (with the manufacturer name): OpenJDK 11
-- Operating System:
The text was updated successfully, but these errors were encountered: