From c9fc20af633bbdc68206ca7d7438cd803793875f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Thu, 2 Nov 2017 17:02:16 +0100 Subject: Remove doc for sendfile/5 use_threads option The option no longer does anything; systems that lack support for non-blocking sendfile(2) will use the Erlang fallback. --- lib/kernel/doc/src/file.xml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'lib/kernel/doc') diff --git a/lib/kernel/doc/src/file.xml b/lib/kernel/doc/src/file.xml index 3e3c5b3bf3..58abb35428 100644 --- a/lib/kernel/doc/src/file.xml +++ b/lib/kernel/doc/src/file.xml @@ -1837,24 +1837,16 @@ f.txt: {person, "kalle", 25}.

The file used must be opened using the raw flag, and the process calling sendfile must be the controlling process of the socket. See gen_tcp:controlling_process/2.

-

If the OS used does not support sendfile, an Erlang fallback - using - read/2 and - gen_tcp:send/2 is used.

+

If the OS used does not support non-blocking sendfile, an + Erlang fallback using read/2 + and gen_tcp:send/2 is + used.

The option list can contain the following options:

chunk_size

The chunk size used by the Erlang fallback to send data. If using the fallback, set this to a value that comfortably fits in the systems memory. Default is 20 MB.

- use_threads -

Instructs the emulator to use the async thread pool for the - sendfile system call. This can be useful if the OS you are running - on does not properly support non-blocking sendfile calls. Notice that - using async threads potentially makes your system vulnerable to slow - client attacks. If set to true and no async threads are available, - the sendfile call returns {error,einval}. - Introduced in Erlang/OTP 17.0. Default is false.

-- cgit v1.2.3