MCPcopy Index your code
hub / github.com/jesseduffield/lazygit / handle

Method handle

pkg/tasks/async_handler.go:45–58  ·  view source on GitHub ↗

f here is expected to be a function that doesn't take long to run

(f func(), id int)

Source from the content-addressed store, hash-verified

43
44// f here is expected to be a function that doesn't take long to run
45func (self *AsyncHandler) handle(f func(), id int) {
46 self.mutex.Lock()
47 defer self.mutex.Unlock()
48
49 if id < self.lastId {
50 if self.onReject != nil {
51 self.onReject()
52 }
53 return
54 }
55
56 self.lastId = id
57 f()
58}

Callers 1

DoMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected