thread: Add comments

This commit is contained in:
Hajime Hoshi 2020-02-24 01:54:52 +09:00
parent 00e78c1eae
commit 5040b3bcfc

View File

@ -57,6 +57,8 @@ loop:
// Call calls f on the thread. // Call calls f on the thread.
// //
// Do not call this from the same thread. This would block forever. // Do not call this from the same thread. This would block forever.
//
// Call panics when Loop already ends.
func (t *Thread) Call(f func() error) error { func (t *Thread) Call(f func() error) error {
select { select {
case t.funcs <- f: case t.funcs <- f: