Re: [go-nuts] Detecting race conditions

2023-06-05 Thread Levi Durfee
Thank you all! This was very helpful :) On Sun, Jun 4, 2023 at 3:54 PM 'Axel Wagner' via golang-nuts < golang-nuts@googlegroups.com> wrote: > I think the race detector is already relatively good at this. Like, AIUI, > it keeps track of the partial order of events and checks if that is > consisten

Re: [go-nuts] Can we further optimize the scheduling order of goroutines in sync.Mutex?

2023-06-05 Thread Ian Lance Taylor
On Mon, Jun 5, 2023 at 5:08 AM fliter wrote: > > Thanks for your answer. But I wonder if the elements behind the queue may > wait for a very long time? Can we maintain a waiting time after entering the > queue for each coroutine, and acquire locks from high to low The queue is already FIFO orde

Re: [go-nuts] Can we further optimize the scheduling order of goroutines in sync.Mutex?

2023-06-05 Thread Robert Engels
That is implicit since the list of waiters is ordered. > On Jun 5, 2023, at 7:08 AM, fliter wrote: > > Thanks for your answer. But I wonder if the elements behind the queue may > wait for a very long time? Can we maintain a waiting time after entering the > queue for each coroutine, and acqu

Re: [go-nuts] Can we further optimize the scheduling order of goroutines in sync.Mutex?

2023-06-05 Thread fliter
Thanks for your answer. But I wonder if the elements behind the queue may wait for a very long time? Can we maintain a waiting time after entering the queue for each coroutine, and acquire locks from high to low Thanks again. 在2023年6月4日星期日 UTC+8 01:07:52 写道: > On Sat, Jun 3, 2023 at 12:35 AM f

[go-nuts] Re: [RFC] Yet another proposal for Go2 error handling

2023-06-05 Thread Jan
Repeating Justin's consideration: one of my (and from colleagues I discuss the topic with) major issues with current error handling is the repetition of identical code. Your proposal still requires `when err handle ...` at every statement. It also doesn't allow for nested call of functions that