Documentation
¶
Overview ¶
Package worklist provides a thread-safe work queue for distributing file paths to concurrent workers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
Path string
}
Entry represents a single work item containing a file path to process.
type Worklist ¶
type Worklist struct {
// contains filtered or unexported fields
}
Worklist is a thread-safe queue for distributing work entries to multiple workers. It is safe for concurrent use by multiple goroutines.
func (*Worklist) Add ¶
Add adds a work entry to the worklist. This will block if the buffer is full.
func (*Worklist) Close ¶ added in v1.1.0
func (w *Worklist) Close()
Close closes the worklist channel, signaling that no more work will be added. Workers should drain remaining items before exiting.
func (*Worklist) Len ¶ added in v1.1.0
Len returns the approximate number of pending jobs in the worklist. This value may change immediately after calling.