Skip to main content
Module

x/workerio/mod.ts>readableStreamFromWorker

🦕 Deno module to translate Worker's system of messages into Reader and Writer
Go to Latest
function readableStreamFromWorker
import { readableStreamFromWorker } from "https://deno.land/x/workerio@v3.0.1/mod.ts";

Creates a readable stream that reads data from a worker's postMessage event.

Parameters

worker: Worker

The worker to read data from.

optional
options: ReadableStreamFromWorkerOptions = [UNSUPPORTED]

The options to configure the behavior of the stream. Defaults to 16 KiB chunk size and a queuing strategy with highWaterMark of 1 and undefined size.

Returns

ReadableStream<Uint8Array>

A readable stream that can be used to read the data.