SharedArrayBuffer and Atomics Lab

Medium
0.0% Acceptance

In this lab, you will get familiar with the SharedArrayBuffer, a JavaScript high-level programming construct that enables concurrent access to a shared memory buffer that can be shared between the main thread and web workers. You will also work with the JavaScript Atomics API which provides atomic operations to guarantee that no other writes or reads occur on shared memory locations during the operation. These constructs help in creating concurrency-enabled and thread-safe experiences in your JavaScript applications.

Throughout the lab, you will be required to implement different functionalities using SharedArrayBuffer and Atom. The lab is designed to help you understand and grasp the usage and implementation of SharedArrayBuffer and Atomics in JavaScript.

Concepts Covered:

  1. Creating SharedArrayBuffer instances
  2. Sending and receiving SharedArrayBuffers between main thread and web workers
  3. Using the Atomics API to perform atomic operations
  4. Building a simple concurrency-enabled counter application