markAdoptedNativePayloadTransferred function
Clears adopted handles after a successful send so the worker does not free.
Implementation
void markAdoptedNativePayloadTransferred(WorkerResponse response) {
switch (response) {
case QueryResponse():
response.clearAdoptedNativeAfterSend();
case StreamFetchResponse():
response.clearAdoptedNativeAfterSend();
case StreamPollFetchResponse():
response.clearAdoptedNativeAfterSend();
default:
break;
}
}