June 2018
Intermediate to advanced
316 pages
6h 34m
English
A stack is a data structure that's built on the last in, first out (LIFO) principle and allows you only to insert or delete an item at the top of the stack:

Once you're familiar with this data structure, we can get to the concept of the thread stack. Let's look at the following example:
fun main(args: Array<String>) { val value = 3 blockTop(value)}fun blockTop(value: Int) { }
When this program starts, a stack for the main thread is created. This stack will contain a block for the main function when the program enters the scope of the main function:
When the main function invokes the blockTop function, a new block is pushed to the ...
Read now
Unlock full access