You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2020/09/11 15:43:43 UTC

[GitHub] [geode] agingade commented on a change in pull request #5503: GEODE-8482: Concurrent access to ArrayList should be synchronized

agingade commented on a change in pull request #5503:
URL: https://github.com/apache/geode/pull/5503#discussion_r487130937



##########
File path: geode-core/src/main/java/org/apache/geode/internal/cache/control/InternalResourceManager.java
##########
@@ -637,7 +638,9 @@ private ThreadsMonitoring getThreadMonitorObj() {
    */
   public void addStartupTask(CompletableFuture<Void> startupTask) {
     Objects.requireNonNull(startupTask);
-    startupTasks.add(startupTask);
+    synchronized (startupTasks) {

Review comment:
       Can this be achieved by changing startupTasks to CopyOnWriteArrayList.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org