Closed goneall closed 3 years ago
If we move the asynchronous behavior to the XmlLicenseProviderWithCrossRefDetails https://github.com/spdx/LicenseListPublisher/blob/c56fef6c44fe4b8f69c5fc157cc38045cdd6be6b/src/org/spdx/licensexml/XmlLicenseProviderWithCrossRefDetails.java#L58 by making the buildUrlDetails return Future<String[]> and change the implementation of buildUrlDetails to synchronously call the underlying methods, we could launch a number of license URL builders in parallel.
XmlLicenseProviderWithCrossRefDetails
buildUrlDetails
Future<String[]>
We would essentially launch a maximum number of future computations and on the next() call check to see which one has completed and return the ones that are ready only blocking and waiting if we run out of readily completed checks.
Resolved in PR #82
If we move the asynchronous behavior to the
XmlLicenseProviderWithCrossRefDetails
https://github.com/spdx/LicenseListPublisher/blob/c56fef6c44fe4b8f69c5fc157cc38045cdd6be6b/src/org/spdx/licensexml/XmlLicenseProviderWithCrossRefDetails.java#L58 by making thebuildUrlDetails
returnFuture<String[]>
and change the implementation ofbuildUrlDetails
to synchronously call the underlying methods, we could launch a number of license URL builders in parallel.We would essentially launch a maximum number of future computations and on the next() call check to see which one has completed and return the ones that are ready only blocking and waiting if we run out of readily completed checks.