From 1e28d340b659f5503ab36569cc37bca4ab964bd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Crevon?= Date: Tue, 21 Nov 2023 09:41:56 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com> --- docs/sources/next/javascript-api/k6-experimental/fs/open.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sources/next/javascript-api/k6-experimental/fs/open.md b/docs/sources/next/javascript-api/k6-experimental/fs/open.md index ce3fcb5969..adea25c41d 100644 --- a/docs/sources/next/javascript-api/k6-experimental/fs/open.md +++ b/docs/sources/next/javascript-api/k6-experimental/fs/open.md @@ -6,11 +6,11 @@ weight: 20 # open -The `open` function opens a file and returns a promise that resolves to a [File](https://grafana.com/docs/k6//javascript-api/k6-experimental/fs/file) instance. This function loads the file into shared memory space accessible by all Virtual Users (VUs). This approach significantly reduces the memory footprint, enabling the handling of large files without overwhelming memory resources. +The `open` function opens a file and returns a promise that resolves to a [File](https://grafana.com/docs/k6//javascript-api/k6-experimental/fs/file) instance. This function loads the file into shared memory space accessible by all Virtual Users (VUs). This approach significantly ~reduces the memory footprint~, enabling the handling of large files without overwhelming memory resources. ### Asynchronous Nature -It's important to note that `open` is asynchronous and returns a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). Due to k6's current limitation with the init context (which doesn't support asynchronous functions directly), you need to use an asynchronous wrapper like this: +It's important to note that `open` is asynchronous and returns a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). Due to k6's current limitation with the Init context (which doesn't support asynchronous functions directly), you need to use an asynchronous wrapper like this: {{< code >}}