ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaikiran <...@git.apache.org>
Subject [GitHub] ant issue #81: Fix rare ConcurrentModificationException when running with Pa...
Date Wed, 12 Dec 2018 01:08:47 GMT
Github user jaikiran commented on the issue:

    https://github.com/apache/ant/pull/81
  
    I don't have enough knowledge about the thread safety aspects of the `Project` class.
Stefan (@bodewig) would know more. However, having look at its code, I see similar locks and
thread safety constructs for other members, so I think this change is fine.
    
    As for the testcase, I think it's OK to add one. However, the snippet that you pasted
might need some work. Right now, it uses a single thread and then in that thread's execution
runs the APIs of the `Project` class in a loop. So it really doesn't exercise the multi-thread
access behaviour and the access will all be sequential. What you could do is, use a fixed
thread pool with a decent size (10 perhaps) and then use a loop (of 10) to submit the `p.CopyOfReferences`
in that loop and finally `get()` the result for each of those `Future`s.



---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message