Documentation
¶
Overview ¶
Package workspace provides workspace-level utilities including locking.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lock ¶
type Lock struct {
// contains filtered or unexported fields
}
Lock represents an acquired workspace lock.
The lock used to install its own SIGINT handler that removed the lock file and called os.Exit(130). That is why an interrupt used to throw away the conversation: the process died before the turn could write down what it had done. Cleanup now happens on the normal exit path, and the interrupt is handled where the run context can be cancelled.
func AcquireLock ¶
AcquireLock attempts to acquire an exclusive lock on a workspace directory. This prevents multiple kvit-coder instances from running on the same workspace simultaneously, which would cause checkpoint conflicts. Returns a Lock that must be released by calling Release(), or an error if lock fails.