Skip to content

Commit

Permalink
Solve an issue where 2 threads would get locked at startup
Browse files Browse the repository at this point in the history
These two threads (one loading XText, the other trying to compile the
metamodel) would get locked at startup, both trying to compile and
instantiate the gama platform agent.
  • Loading branch information
AlexisDrogoul committed Aug 9, 2021
1 parent 1ed867b commit fd2d4b4
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -234,7 +234,9 @@ public static String getProjectPathOf(final Resource r) {
}
}

public synchronized static GamlResource getTemporaryResource(final IDescription existing) {
// AD The removal of synchronized solves an issue where threads at startup would end up waiting for
// GamlResourceServices to become free
public/* synchronized */ static GamlResource getTemporaryResource(final IDescription existing) {
ResourceSet rs = null;
GamlResource r = null;
if (existing != null) {
Expand Down

0 comments on commit fd2d4b4

Please sign in to comment.