```ts
// index.ets
var sab = new SharedArrayBuffer(32);
// int32 buffer view for sab
var i32a = new Int32Array(sab);
i32a[0]=0;
let producer = new worker.ThreadWorker("entry/ets/workers/worker_producer.ts")
producer.postMessage(sab);
let consumection(e : MessageEvents) {
var sab = e.data;
var i32a = new Int32Array(sab);
console.info("Customer: received sab");
while(true) {
Atomics.wait(i32a,0,0); //blocked here until be waked.
var length = i32a.length;
for (var i = length-1; i > 0; i--) {
console.info("arraybuffer " + i + " value is " + i32a);
i32a = i;
}
}
}
```