| Extracted from Pike v7.8 release 866 at 2016-04-05.

[Top]
Stdio
Stdio.File

# Method Stdio.File()->set_blocking()

Method set_blocking

  `void set_blocking()`

Description

  This function clears all callbacks and sets a stream to blocking mode. i.e. reading, writing and closing will wait until data has been transferred before returning.

Note

  The callbacks are cleared and blocking mode is set in one atomic operation, so no callback gets called in between if the backend is running in another thread.

  Even so, if the stream is in callback mode (i.e. if any callbacks are installed) then only the backend thread can use this function reliably; it might otherwise already be running in a callback which is about to call e.g. write when the stream becomes blocking.

See also

  set_nonblocking() , set_nonblocking_keep_callbacks() , set_blocking_keep_callbacks()

Method set_blocking

  `void set_blocking()`

Description

  Sets this file to blocking operation.

  This is the inverse operation of set_nonblocking() .

See also

  set_nonblocking()