File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
src/main/java/org/scijava/usage Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 4242import org .scijava .plugin .Plugin ;
4343import org .scijava .service .AbstractService ;
4444import org .scijava .service .Service ;
45+ import org .scijava .thread .ThreadService ;
4546
4647/**
4748 * Default service for tracking anonymous usage statistics.
49+ * <p>
50+ * Please note that that this implementation is <em>not</em> thread safe. It is
51+ * up to the caller to ensure that multiple threads do not attempt to modify
52+ * statistics at the same time. One way to do that (but not the only way) is to
53+ * only call {@link #increment(Object)} from the event dispatch thread (i.e.,
54+ * when {@link ThreadService#isDispatchThread()} returns true). And one easy way
55+ * to accomplish that is by calling the {@link UsageService} only from event
56+ * handler methods.
57+ * </p>
4858 *
4959 * @author Curtis Rueden
5060 */
You can’t perform that action at this time.
0 commit comments