Thread - Shared Variable

Process States

About

shared state in threads.

Threads communicate primarily by sharing access to fields and the objects reference fields refer to. This form of communication is extremely efficient, but makes two kinds of errors possible:

The tool needed to prevent these errors is synchronization.

Function Programming Language characteristics like immutability and no side-effects are extremely helpful while writing multi-threaded code because developers doesn't to worry about synchronizing of the state.

Coordination

Threads often have to coordinate their actions. The most common coordination idiom is the guarded block.





Discover More
Imperative Vs Functional
Code - Functional programming (FP) - Collection Operations

Functional programming (FP) defines standard operations on collections. It is a declarative paradigm that treats computation as the evaluation of mathematical functions. Most of the operations, you perform...
Process States
Process - Shared State (Shared Data)

Shared state between processes Operations upon shared states are critical sectioncritical sections that must be mutually exclusive. Failure to obey this rule opens up the possibility of corrupting the...



Share this page:
Follow us:
Task Runner