(message *diagnostics.Message, args ...any)
| 97 | } |
| 98 | |
| 99 | func (p *projectLoadingProgress) finish(message *diagnostics.Message, args ...any) { |
| 100 | select { |
| 101 | case p.ch <- progressEvent{message: message, args: args, finish: true}: |
| 102 | // Sent successfully. |
| 103 | case <-p.reporter.done(): |
| 104 | // Server shutting down; drop the event. |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | // run is the persistent goroutine that processes all progress events. |
| 109 | // It owns all mutable state: no external synchronization needed. |