Skip to content

Commit

Permalink
(feat): Add clarification about delays
Browse files Browse the repository at this point in the history
  • Loading branch information
lasith-kg committed Nov 22, 2023
1 parent 10aab63 commit 5e09f18
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions internal/action/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,16 @@ import (
const (
// Device operations like mounting and formatting are
// delegeated to respective C-based tools like `mount` and `mkfs`.
// From experience, we need to
// From experience, we need to introduce a slight delay to ensure
// that the file-system is eventually consistent with any changes
// that were performed
DefaultDeviceActionDelay = 100 * time.Millisecond
DefaultFileActionDelay = 0
// File changes like os.Chown and os.Chmod are performed
// natively through golang standard libraries. Since these standard
// libraries are making direct syscalls, changes are reflected almost
// immidiately on the file-system. Therefore a delay is not required
// for actions that peform file changes
DefaultFileActionDelay = 0
)

type Action interface {
Expand Down
Binary file modified main
Binary file not shown.

0 comments on commit 5e09f18

Please sign in to comment.