The Ballerina language establishes a concurrent friendly approach to programming through light-weighted threads called strands. This is achieved by providing support for both preemptive and cooperative multitasking. When executing a concurrent program in a multi-threaded environment, the safe usage of shared resources is pivotal. This is obtained through a language concept called isolation. In this article, we will take an in-depth look at the concurrent safety support of Ballerina and see how HTTP services can be implemented to provide timely and accurate responses using isolation.
Race Condition in Concurrent Programming
In order to maintain the dynamic nature of a service, the following two aspects are considered during its implementation.