Skip to content

Commit 147f315

Browse files
committed
🔀 Merge branch 'devel' into release
- Node.js v14.x is supported - SharedArrayBuffer is also used with Uint8Array Signed-off-by: kei-g <km.8k6ce+github@gmail.com>
2 parents cb49b27 + 88906ec commit 147f315

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

async-iterable-queue.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,13 @@ export class AsyncIterableQueue<T> implements AsyncIterable<T> {
6868
/**
6969
* この待ち行列の現在の状態
7070
*/
71-
readonly #state = new Uint8Array([AIQState.undefined])
71+
readonly #state = new Uint8Array(new SharedArrayBuffer(1))
7272

7373
/**
7474
* コンストラクタ
7575
*/
7676
constructor() {
77+
this.#state[0] = AIQState.undefined
7778
const resolveAsync = createAsyncResolver({
7879
finish: () => Atomics.exchange(this.#state, 0, AIQState.finished),
7980
resolvers: this.#resolvers,

0 commit comments

Comments
 (0)