Created
January 15, 2016 03:19
-
-
Save hackintoshrao/485cd6d53db44a634acf to your computer and use it in GitHub Desktop.
Code without any concurrent execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
my_sleep_func() | |
fmt.Println("Control doesnt reach here till my_sleep_func finishes executing") | |
} | |
func my_sleep_func() { | |
//sleeps for 5 seconds | |
time.Sleep(5 * time.Second) | |
fmt.Println("My func out of sleep") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment