|
|
|
|
|
by wslh
5169 days ago
|
|
If the code block can run in a different thread (like in Grand Central Dispatch) it is very useful to do stuff in the background without blocking the GUI (that executes in a specific thread) and using the current scope variables. A progress bar is a clear example of this. Doing this without code blocks adds extra code like launching another thread, connecting the scope to the new thread. |
|