Thank you for the clarification. i will check again source code. Thank you!

2022년 11월 26일 (토) 오전 2:07, Ian Lance Taylor <i...@golang.org>님이 작성:

> On Fri, Nov 25, 2022 at 8:35 AM UK <sun852...@gmail.com> wrote:
> >
> > channel and mutex eventually call futexsleep(in runtime source) when
> need to block
> >
> > but  when I tested sync.Mutex lock 10000 times, there is only 8 threads..
> >
> > futex is os level operation(syscall), then futex sleep os-level
> thread(not goroutine)
> >
> > right? somebody help me understand...
>
> It's not accurate to say that channel and mutex operations always call
> futexsleep.  Those operations will park the goroutine until it is
> ready and the thread will enter the scheduler to find another
> goroutine to run.  futexsleep is used by a thread when there is no
> goroutine available to schedule.
>
> Ian
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CADR3yz3UPx57-zSqoTuZ9gLNA_b6SjYOPKYQ3ggFGdScuGU%3Dwg%40mail.gmail.com.

Reply via email to