Learning the basic terminology
Before we begin understanding how to implement concurrency in V, we will start by learning a few basic terms that we commonly use when working with concurrency:
- Program: A program is a set of instructions in the form of functions and statements that help us achieve a particular job.
- Process: A program with one or more functions and statements, when it starts running, is associated with the process. A process can have one or more sub-processes, each of them running on a different thread.
- Thread: A thread allows one or more tasks to run in sequential order.
- Task: A task is a unit of work that runs on a thread. It can be represented as a function in V.
Now that we understand these basic terminologies, let's get started with the concepts of concurrency that will help us implement concurrent programs in V.