Commit 39f40159 authored by Kirill Smelkov's avatar Kirill Smelkov

libgolang: Provide top-level overview for defer

defer is now part of libgolang API (see 1d153a45 "libgolang: Expose
defer as public C++ API"). It should be explained in top-level overview.
parent c7a1bce7
......@@ -38,6 +38,7 @@
// - `go` spawns new task.
// - `chan<T>`, and `select` provide channels with Go semantic and automatic
// lifetime management.
// - `defer` schedules cleanup.
// - `panic` throws exception that represent C-level panic.
//
// For example:
......@@ -59,6 +60,10 @@
// if (_ == 2)
// // case 2 selected: j received from ch
//
// defer([]() {
// printf("leaving...\n");
// });
//
// if (<bug condition>)
// panic("bug");
//
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment