From 0becf8af093c03d7c207f7104500677811d6d682 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Fri, 16 Jun 2017 18:22:34 -0500 Subject: [PATCH] Add nonblock and fsync flags in eio Not 100% if these are needed, but it doesn't seem to hurt either. --- lib/EioDriver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/EioDriver.php b/lib/EioDriver.php index b58fe29..4ad0e8b 100644 --- a/lib/EioDriver.php +++ b/lib/EioDriver.php @@ -2,7 +2,7 @@ namespace Amp\File; -use Amp\{ Deferred, Failure, Loop, Promise, Success }; +use Amp\{ Deferred, Loop, Promise, Success }; class EioDriver implements Driver { private $watcher; @@ -54,7 +54,7 @@ class EioDriver implements Driver { * {@inheritdoc} */ public function open(string $path, string $mode): Promise { - $flags = $this->parseMode($mode); + $flags = \EIO_O_NONBLOCK | \EIO_O_FSYNC | $this->parseMode($mode); $chmod = ($flags & \EIO_O_CREAT) ? 0644 : 0; ($this->incrementor)(1);