Giter Site home page Giter Site logo

Comments (1)

overheadhunter avatar overheadhunter commented on June 13, 2024

For the record here is some more information regarding the difference between SYNC and SYNCHRONIZE.

What SYNC means for Java NIO

In the Java world, SYNC is used as a flag during creation of a file handle to request every change to be persisted immediately without caching etc:

Requires that every update to the file's content or metadata be written synchronously to the underlying storage device.

~Source

What SYNCHRONIZE means for Microsoft

In the Microsoft world, the SYNCHRONIZE access right is defined as:

The right to use the object for synchronization. This enables a thread to wait until the object is in the signaled state.

~ Source

This sounds a lot like the wait/notify mechanism in the Java world. I.e. the filehandle can be used as a semaphore.

Each time an I/O operation is started, the operating system sets the file handle to the nonsignaled state. Each time an I/O operation is completed, the operating system sets the file handle to the signaled state.

~ Source

More on this topic can be found here.

How to request uncached write using win32 APIs

What comes closest to the Java SYNC flag is probably FILE_FLAG_WRITE_THROUGH or FILE_FLAG_NO_BUFFERING as defined in the win32 file API.

from dokany-nio-adapter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.