In this blog, let us discuss a program to visualize concurrency in Golang. Reference and source: Program 1: import " fmt " import " time " func main () { var Ball int Ball = 5 table := make ( chan int ) go player (table, 1 ) go player (table, 2 ) fmt. Println ( " mainstart: " , Ball) table <- Ball time. Sleep ( 1 * time. Second ) endres := <- table fmt. Println ( " mainend: " , endres) } func player ( table chan int , playernumber int ){ for { ball := <- table fmt. Println (playernumber, " : " ,ball) ball++ time. Sleep ( 100 * time. Millisecond ) table <- ball } } /* ---------------------------------------------------------------------------------------------------------- Explanation: Please try to visualize on your own before reading the explanation. We will name the two goroutines that are called as player1_goroutine
This is the place to start if you already have some experience in python, virtual env, flask. If you want to have some hands-on on how to deploy a simple python based flask app in Google Cloud. please refer to the following link. https://cloud.google.com/appengine/docs/standard/python/getting-started/python-standard-env The link provides all the instructions to get your python app up and running. Here are some points to be noted when you are doing this activity. The standard environment only works with python2.7 and not with python 3.5 and above. If you have already installed python3.5, please perform an alternate install of python2.7 as well. If you're an active developer who had been developing using python3.5 and don't want to modify the python3.5 to python symlink on your machine, please perform the above testing activity in a python virtual env. You need to create the virtualenv folder using python2.7 explicitly using the following command $ virtualenv -p /u