mirror of
https://github.com/agdamsbo/prioritized.grouping.git
synced 2025-09-12 18:49:39 +02:00
15 lines
871 B
TypeScript
15 lines
871 B
TypeScript
import { Endpoint } from './task-common';
|
|
import { SyncRequestData } from './message';
|
|
/**
|
|
* Respond to a blocking request. Most of the work has already been done in
|
|
* asynclink, we are just responsible here for getting the return value back to
|
|
* the requester through this slightly convoluted Atomics protocol.
|
|
* @param {Endpoint} endpoint A message port to receive messages from. Other
|
|
* thread is blocked, so we can't send messages back.
|
|
* @param {SyncRequestData} data The message that was recieved. We will use it
|
|
* to read out the buffers to write the answer into. NOTE: requester
|
|
* owns buffers.
|
|
* @param {any} response The value we want to send back to the requester. We
|
|
* have to encode it into data_buffer.
|
|
*/
|
|
export declare function syncResponse(endpoint: Endpoint, data: SyncRequestData, response: any): Promise<void>;
|