-
-
Notifications
You must be signed in to change notification settings - Fork 25
Skip usage of EIO_O_FSYNC if undefined #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Honestly I don't understand why Travis didn't catch this... |
|
Because Travis uses glibc instead of musl. I think we should conditionally use that flag then. |
|
Oh so the constant still does exist with glibc? Should I add a ternary operator to use it if it exists? I have no idea what it's for... |
|
As I understood, the flag requires writes to be successfully written to disk before returning (synchronous). In context of this library, since the writing is done in a separate thread, we can know the data was actually written to disk when the promise succeeds. Since we aren't able to use the flag in other drivers (or apparently some platforms), I think let's just remove it. |
No, we can't know that without Please change it to a conditional, yes. |
Reading that, it seems like what I said is true. Am I not understanding something? |
|
@trowski I understood you said we don't need the flag, because we do writes in another thread? |
|
No, I phrased it poorly I guess. My point was that we use the flag for synchronous writes to ensure the data is written, but the synchronous write happens in another thread, so it's non-blocking. However, only EIO exposes this flag, so behavior is inconsistent between drivers and apparently between platforms. I suggested removing the flag for consistency. I'm also fine with using it conditionally if we don't care about that. |
|
We could add |
|
Thanks! |
See https://pecl.php.net/package-changelog.php?package=eio&release=2.0.2 and reactphp/filesystem#34