Done can only be called once. If you call it twice, it will panic.
()
| 65 | |
| 66 | // Done can only be called once. If you call it twice, it will panic. |
| 67 | func (tx *DBTx) Done() error { |
| 68 | tx.mu.Lock() |
| 69 | defer tx.mu.Unlock() |
| 70 | |
| 71 | close(tx.done) |
| 72 | return <-tx.finalErr |
| 73 | } |