Is adding routes thread-safe in Spark framework?

Viewed 304

The SimpleRouteMatcher stores added routes in an ArrayList.

public SimpleRouteMatcher() {
    routes = new ArrayList<RouteEntry>();
}

There doesn't seem to be any synchronization surrounding the access of these routes. Since they are accessed from a separate server thread, are updates to the list of routes guaranteed to be visible?

1 Answers
Related