LEADER 00000cam a2200685Ii 4500 003 OCoLC 005 20240129213017.0 006 m o d 007 cr unu|||||||| 008 180829s2018 enka o 000 0 eng d 020 9781788626729|q(electronic bk.) 020 1788626729|q(electronic bk.) 029 1 AU@|b000066232791 029 1 CHNEW|b001039838 029 1 CHVBK|b559035020 035 (OCoLC)1050169896 037 CL0500000988|bSafari Books Online 037 624C5C91-0A03-4D48-BBE4-8C47C29CAACE|bOverDrive, Inc. |nhttp://www.overdrive.com 040 UMI|beng|erda|epn|cUMI|dOCLCF|dSTF|dTEFOD|dCEF|dG3B|dTEFOD |dEBLCP|dMERUC|dUAB|dOCLCQ|dK6U|dN$T|dOCLCO|dNLW|dOCLCO |dNZAUC|dOCLCQ|dOCLCO|dOCLCL 049 INap 082 04 005.365 082 04 005.365|223 099 eBook O'Reilly for Public Libraries 100 1 Castiblanco Torres, Miguel Angel,|eauthor. 245 10 Learning concurrency in Kotlin :|bbuild highly efficient and robust applications /|cMiguel Angel Castiblanco Torres.|h[O'Reilly electronic resource] 264 1 Birmingham, UK :|bPackt Publishing,|c2018. 300 1 online resource :|billustrations 336 text|btxt|2rdacontent 337 computer|bc|2rdamedia 338 online resource|bcr|2rdacarrier 505 0 Cover; Title Page; Copyright and Credits; Packt Upsell; Contributors; Table of Contents; Preface; Chapter 1: Hello, Concurrent World!; Processes, threads, and coroutines; Processes; Threads; Coroutines; Putting things together; Introduction to concurrency; Concurrency is not parallelism; CPU-bound and I/O-bound; CPU-bound; I/O- bound; Concurrency versus parallelism in CPU-bound algorithms; Single-core execution; Parallel execution; Concurrency versus parallelism in I/O-bound algorithms; Why concurrency is often feared; Race conditions; Atomicity violation; Deadlocks; Livelocks 505 8 Concurrency in KotlinNon-blocking; Being explicit; Readable; Leveraged; Flexible; Concepts and terminology; Suspending computations; Suspending functions; Suspending lambdas; Coroutine dispatcher; Coroutine builders; Summary; Chapter 2: Coroutines in Action; Downloading and installing Android Studio; Creating a Kotlin project; Adding support for coroutines; Android's UI thread; CalledFromWrongThreadException; NetworkOnMainThreadException; Requesting in the background, updating in the UI thread; Creating a thread; CoroutineDispatcher; Attaching a coroutine to a dispatcher 505 8 Starting a coroutine with asyncStarting a coroutine with launch; Using a specific dispatcher when starting the coroutine; Adding networking permissions; Creating a coroutine to call a service; Adding UI elements; What happens when the UI is blocked; Displaying the amount of news that were processed; Using a UI dispatcher; Platform- specific UI libraries; Adding the dependency; Using Android's UI coroutine dispatcher; Creating an asynchronous function to hold the request ... or not; A synchronous function wrapped in an asynchronous caller; An asynchronous function with a predefined dispatcher 505 8 An asynchronous function with a flexible dispatcherHow to decide which option is better; Summary; Chapter 3: Life Cycle and Error Handling; Job and Deferred; Job; Exception handling; Life cycle; New; Active; Canceling; Cancelled; Completed; Determining the current state of a Job; Deferred; Exception handling; States move in one direction only; A note on final states; RSS- Reading from multiple feeds concurrently; Supporting a list of feeds; Creating a thread pool; Fetching the data concurrently; Merging the responses; Testing the concurrent requests; Non-happy path - Unexpected crash 505 8 Having deferred store the exceptionDon't ignore the exception!; Summary; Chapter 4: Suspending Functions and the Coroutine Context; Improving the UI of the RSS Reader; Giving each feed a name; Fetching more information about the articles from the feed; Adding a scrollable list for the articles; Layout for the individual articles; Adapter to map the information; Adding a ViewHolder; Mapping the data; onCreateViewHolder; onBindViewHolder; getItemCount; Allowing the incremental addition of articles to the adapter; Connecting the adapter to the activity; Testing the new UI; Sanitizing the data 520 The requirements of modern day applications are scalability, speed and making the most use of hardware. Kotlin provides immense support for concurrency. This book addresses the challenges for the design and implementation of concurrent code and shows you how to write lock-free concurrent code taking advantage of Kotlin's concurrency support. 588 0 Online resource; title from title page (Safari, viewed August 27, 2018). 590 O'Reilly|bO'Reilly Online Learning: Academic/Public Library Edition 650 0 Application software|xDevelopment. 650 0 Electronic data processing. 650 0 Functional programming (Computer science) 650 0 Mobile apps. 650 6 Logiciels d'application|xDéveloppement. 650 6 Programmation fonctionnelle. 650 6 Applications mobiles. 650 7 Object-oriented programming (OOP).|2bicssc 650 7 Parallel processing.|2bicssc 650 7 Programming & scripting languages: general.|2bicssc 650 7 Application software|xDevelopment|2fast 650 7 Electronic data processing|2fast 650 7 Functional programming (Computer science)|2fast 650 7 Mobile apps|2fast 856 40 |uhttps://ezproxy.naperville-lib.org/login?url=https:// learning.oreilly.com/library/view/~/9781788627160/?ar |zAvailable on O'Reilly for Public Libraries 938 ProQuest Ebook Central|bEBLB|nEBL5520892 938 EBSCOhost|bEBSC|n1860847 994 92|bJFN