Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
pp:2026:scala:l02 [2026/03/05 08:06]
ldaniel
pp:2026:scala:l02 [2026/03/05 13:46] (current)
ldaniel
Line 115: Line 115:
 As a result, by executing intense computation on this branch, we would delay other functionalities or would lock into a specific task instead of scheduling. As a result, by executing intense computation on this branch, we would delay other functionalities or would lock into a specific task instead of scheduling.
  
-To solve this limitation, programmers have created ways ('''​functional closures'''​) in which the main thread injects all the needed parameters to functions and then passes them to other threads, from where they can be unpacked and run. +To solve this limitation, programmers have created ways (''​functional closures''​) in which the main thread injects all the needed parameters to functions and then passes them to other threads, from where they can be unpacked and run. 
  
-Such an implementation for functional closures is represented by '''​zero-parameter lambdas'''​ where the evaluation is delayed by currying such a function over our method:+For a better understanding,​ compare the implementation of ''​curry_for_thread''​ with the one for ''​apply''​ at 2.1.1. 
 + 
 +Such an implementation for functional closures is represented by ''​zero-parameter lambdas''​ where the evaluation is delayed by currying such a function over our method:
  
 <code scala> <code scala>