File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -183,15 +183,15 @@ func main() {
183183 // Use defer to catch cancellation
184184 defer func () {
185185 if r := recover (); r != nil {
186- fmt.Printf (" Coroutine was cancelled : %v \n " , r)
186+ fmt.Printf (" Coroutine was canceled : %v \n " , r)
187187 }
188188 }()
189189
190190 // Yield a value
191191 yield (" before cancel" )
192192
193- // This will never be reached if the coroutine is cancelled
194- fmt.Println (" This won't be executed if cancelled " )
193+ // This will never be reached if the coroutine is canceled
194+ fmt.Println (" This won't be executed if canceled " )
195195 return " completed"
196196 })
197197
@@ -207,7 +207,7 @@ func main() {
207207 func () {
208208 defer func () {
209209 if r := recover (); r != nil {
210- fmt.Printf (" Panic when resuming cancelled coroutine: %v \n " , r)
210+ fmt.Printf (" Panic when resuming canceled coroutine: %v \n " , r)
211211 }
212212 }()
213213 resume (1 )
You can’t perform that action at this time.
0 commit comments