Applying coroutines for asynchronous data processing

In this recipe, we are going to implement a generic extension for the Iterable type, which will provide a replacement for the Iterable<T>.map() function. Our implementation of the Iterable<T>.mapConcurrent() function is going to allow data-mapping-operation optimization by running it concurrently with coroutines. Next, we are going to test our concurrent mapping function implementation by employing it to perform a simulation of a time-expensive operation applied to each of the elements of a sample Iterable object.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.81.111