MCPcopy Index your code
hub / github.com/codechenx/FastTableViewer / loadAndDisplayAsync

Function loadAndDisplayAsync

ftv.go:120–137  ·  view source on GitHub ↗

loadAndDisplayAsync handles the complete async loading workflow

(loader func(*Buffer, chan<- bool, chan<- error), source string)

Source from the content-addressed store, hash-verified

118
119// loadAndDisplayAsync handles the complete async loading workflow
120func loadAndDisplayAsync(loader func(*Buffer, chan<- bool, chan<- error), source string) error {
121 updateChan, doneChan, err := loadDataAsync(loader, b)
122 if err != nil {
123 return err
124 }
125
126 setupFreezeMode(b)
127 if err := validateDataNotEmpty(b, source); err != nil {
128 return err
129 }
130
131 if err := drawUI(b); err != nil {
132 return err
133 }
134
135 startAsyncUpdateHandler(updateChan, doneChan)
136 return runApp()
137}
138
139// loadAndDisplaySync handles the complete sync loading workflow
140func loadAndDisplaySync(loader func(*Buffer) error, source string) error {

Callers 1

mainFunction · 0.85

Calls 6

loadDataAsyncFunction · 0.85
setupFreezeModeFunction · 0.85
validateDataNotEmptyFunction · 0.85
drawUIFunction · 0.85
startAsyncUpdateHandlerFunction · 0.85
runAppFunction · 0.85

Tested by

no test coverage detected