internal/thread: update comments

This commit is contained in:
Hajime Hoshi 2022-12-28 14:46:54 +09:00
parent ece60af1b7
commit 089ba9ee20

View File

@ -29,8 +29,6 @@ type OSThread struct {
}
// NewOSThread creates a new thread.
//
// It is assumed that the OS thread is fixed by runtime.LockOSThread when NewOSThread is called.
func NewOSThread() *OSThread {
return &OSThread{
funcs: make(chan func()),
@ -41,6 +39,8 @@ func NewOSThread() *OSThread {
// Loop starts the thread loop until Stop is called.
//
// It is assumed that an OS thread is fixed by runtime.LockOSThread when Loop is called.
//
// Loop must be called on the thread.
func (t *OSThread) Loop() {
for {