Re:Code blocks in Python
by wslh on Friday April 20, 2012 @09:31AM
(#3867773)
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.
Doing this without code blocks adds extra code like launching another thread, connecting the scope to the new thread.