You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see that internal.NewSpinLock() is internal Lock. Why don't use sync.Mutex?
runtime.Gosched() is put current goroutine to global run queue tail.
Hope your response.
The text was updated successfully, but these errors were encountered:
The reason why I chose spinlock over mutex is that the goroutine would be put into wait queue and awaked when the mutex lock is released by another goroutine, but most of the cases using ants won't hold the lock for a long time, which makes all those actions of mutex worthless, so there will be a higher performance using spinlock.
I see that internal.NewSpinLock() is internal Lock. Why don't use sync.Mutex?
runtime.Gosched() is put current goroutine to global run queue tail.
Hope your response.
The text was updated successfully, but these errors were encountered: