(f, non_blocking=True)
Set non-blocking flag on a file object.

  Args:
    f: file
    non_blocking: bool, default True, non-blocking mode or not
Set non-blocking flag on a file object.
Set non - blocking flag on a file object .
def SetFileNonBlocking(f, non_blocking=True):
  """Set non-blocking flag on a file object.

  Args:
    f: file
    non_blocking: bool, default True, non-blocking mode or not
  """
  flags = fcntl.fcntl(f.fileno(), fcntl.F_GETFL)
  if bool(flags & os.O_NONBLOCK) != non_blocking:
    flags ^= os.O_NONBLOCK
  fcntl.fcntl(f.fileno(), fcntl.F_SETFL, flags)
def SetFileNonBlocking ( f , non_blocking = True ) : flags = fcntl . fcntl ( f . fileno ( ) , fcntl . F_GETFL ) if bool ( flags & os . O_NONBLOCK ) != non_blocking : flags ^= os . O_NONBLOCK fcntl . fcntl ( f . fileno ( ) , fcntl . F_SETFL , flags )