Starting a task

Tasks (refer to the Tasks section in Chapter 4, Control Flow) are independent units of code execution. Often, we want to start executing them, and then continue executing the main code without waiting for the task result. In other words, we want to start the task asynchronously. This can be done with the @async macro:

a = @async 1 + 2 # Task (done) @0x000000002d70faf0

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.133.54