• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// This file contains the definition for the constant values that must be
2// available to both the main thread and the loader thread.
3
4'use strict';
5
6/*
7The shared memory area is divided in 1 32-bit long section. It has to be 32-bit long as
8`Atomics.notify` only works with `Int32Array` objects.
9
10--32-bits--
11    ^
12    |
13    |
14WORKER_TO_MAIN_THREAD_NOTIFICATION
15
16WORKER_TO_MAIN_THREAD_NOTIFICATION is only used to send notifications, its value is going to
17increase every time the worker sends a notification to the main thread.
18
19*/
20
21module.exports = {
22  WORKER_TO_MAIN_THREAD_NOTIFICATION: 0,
23
24  SHARED_MEMORY_BYTE_LENGTH: 1 * 4,
25};
26