JADE Environment Development Ideas


Same idea as #642, but in reverse.

We've previously encountered locking issues due to long-held share locks while copying large collections using Collection::copy or a custom method which performs an includes check. To improve performance, we created a 'copyFrom' method, which copies to the receiver from the source collection supplied, the implementation of which can use an iterator or foreach with discreteLock to avoid locking the source collection for too long.

With that in mind, it'd be good if there was a Collection::tryCopyFrom method which copied a source collection supplied, iterating it without share locking it for the duration of the copy, adding objects which aren't already in the receiver (like tryAdd).

  • Kevin Saul
  • Aug 23 2021
  • Needs review
  • Attach files