Comments (4)
Working of Coroutines: From a thread pool, a thread is used. and within that a corutine will be run, if another task is added to the same coroutine, that mean its in the same thread, run sequently. Once the both corutines running in the thread are done, thread will be sent back to the thread pool
Also, when we add suspend to a method, in java bytecode, it will essentially add a continousity param to the method. this continuity can stop, resume or throw exception for the running task in courtine
from android-interview-questions.
working of findViewById: for each xml tag, a there is a java class, which we get reference as view
in the activity, and then we downcast to get the specific properties
from android-interview-questions.
What happens on the app start:
![Screenshot 2024-05-23 at 11 44 54 AM](https://private-user-images.githubusercontent.com/50016799/333132175-2b815780-440d-4042-b036-dd3e8bf0ecd8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEzMDU4NjUsIm5iZiI6MTcyMTMwNTU2NSwicGF0aCI6Ii81MDAxNjc5OS8zMzMxMzIxNzUtMmI4MTU3ODAtNDQwZC00MDQyLWIwMzYtZGQzZThiZjBlY2Q4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE4VDEyMjYwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY2Yjc0MzU4NzQ0MjI5NzA1MzBjZmVkMWUxMTllZDU3MDQzOWYxMTZjZDQ2YjU0ZDUwYzRjMjFhYzVhOTViMGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.5NDm4AvW2gNJt8Du7xnwjDqFtLL2mJQbddnwgqas9ko)
from android-interview-questions.
Dispatcher:
Responsible for deciding which thread or threads will execute your coroutines.
Dispatcher.IO vs Dispatcher.Default:
Dispatchers.Default is specifically designed for CPU-intensive tasks because it provides a fixed-size thread pool that matches the number of available CPU cores. This design ensures optimal CPU utilization, minimizes context switching overhead, and offers predictable performance. In contrast, Dispatchers.IO is better suited for I/O-bound tasks due to its elastic thread pool, which can handle a high number of blocking operations efficiently but is not suitable for CPU-bound tasks due to the risk of thread contention and starvation.
from android-interview-questions.
Related Issues (17)
- Need to add the questions in readme
- Need to add the questions in readme HOT 3
- Difference between serializable and parcelable
- How Extension function works in kotlin
- How Data class is better
- Add this toptal questions in readme too
- behavioural thingy
- multi process apps advantage HOT 1
- If 2 task is running then 1 task crash how to avoid other task to crash HOT 2
- How to debug recyclerview scroll
- lateinit vs lazy
- sealed class vs sealed interface
- Questions check later
- SOLID Principles HOT 5
- Behavioural questions to prep! HOT 1
- zomato HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-interview-questions.