file
file copied to clipboard
An abstraction layer and non-blocking file access solution that keeps your application responsive.
See https://github.com/amphp/byte-stream/issues/51. We don't want to generally expose this information for any stream, but for the filesystem, this is useful information, because retries based on that information are common there,...
I'm running the following code: ``` write('file.txt', 'text'); EventLoop::run(); // it never ends ``` Writing the file works as expected, the script hangs on the `EventLoop::run()` call. I have a...
Fixes #79
``` exceptionErrorHandler(2,"EvLoop::run(): Libev error(9): Bad file descriptor","\/www\/pony\/fantasiaNew\/vendor\/revolt\/event-loop\/src\/EventLoop\/Driver\/EvDriver.php",157) EvDriver.php(157): run(3) AbstractDriver.php(470): dispatch(false) AbstractDriver.php(532): tick(false) Revolt\EventLoop\Internal\{closure}() AbstractDriver.php(86): start() DriverSuspension.php(97): Revolt\EventLoop\Internal\{closure}() Future.php(251): suspend() EioFilesystemDriver.php(86): await() Filesystem.php(33): getStatus("\/www\/pony\/fantasiaNew\/fantasiaNewv8.madeline") Filesystem.php(58): getStatus("\/www\/pony\/fantasiaNew\/fantasiaNewv8.madeline") functions.php(117): exists("\/www\/pony\/fantasiaNew\/fantasiaNewv8.madeline") SessionPaths.php(95): Amp\File\exists("\/www\/pony\/fantasiaNew\/fantasiaNewv8.madeline")...
This modifies the parallel driver to create its own internal pool by default, rather than reuse the global worker pool. A specific pool can still be passed to the constructor...
``` PHP Fatal error: Uncaught TypeError: fseek(): supplied resource is not a valid stream resource in /.../vendor/amphp/file/src/Driver/BlockingFile.php:184 Stack trace: #0 /.../vendor/amphp/file/src/Driver/BlockingFile.php(184): fseek(Resource id #383, 0, 0) #1 ...: Amp\File\Driver\BlockingFile->seek(0) ```...