Project

General

Profile

Feature #4528

[PATCH] ext/io/nonblock: avoid unnecessary fcntl F_SETFL calls

Added by normalperson (Eric Wong) over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Target version:
[ruby-core:35556]

Description

=begin
Avoid F_SETFL if we're not changing the O_NONBLOCK bit. F_SETFL
is an expensive operation since it needs to affect all processes
with the same file object.

rb_io_set_nonblock() implements similar logic to avoid F_SETFL
in io.c
=end


Files

Also available in: Atom PDF