Module: Lich::Common::SharingViolationRetry

Included in:
FrontendSettings, InternalAPI::ActiveSessions
Defined in:
documented/common/sharing_violation_retry.rb

Overview

Bounded retry for filesystem mutations that Windows refuses with EACCES (a sharing violation) while another process briefly holds the file open.

Extend a module with this mixin to give it a private retry_sharing_violation singleton method. The backoff sleeps through the extending module's own sleep, so specs can stub it there.

Constant Summary collapse

DELAYS =

Backoff between attempts, 0.31 s in total.

Returns:

  • (Array<Float>)
[0.01, 0.02, 0.04, 0.08, 0.16].freeze