Visser, Dale
unread,Jun 22, 2015, 5:50:32 PM6/22/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dependen...@googlegroups.com
I am writing an analyzer, and I have written a piece of code like this, where 'dependency' is a new Dependency instance I have created inside the Analyzer, and 'engine' is the Engine instance passed into analyzeFileType(Dependency, Engine):
// copy, alter and set in case some other thread is iterating over
final List<Dependency> dependencies = new ArrayList<Dependency>(engine.getDependencies());
dependencies.add(dependency);
engine.setDependencies(dependencies);
Am I being too cautious? Is the execution of the various Analyzers by the Engine single-threaded, or effectively so?
Best regards,
Dale Visser