protty
protty
Another option to maybe consider: `suspend` could now return an error.Cancelled, then `cancel frame` resumes the frame while making the suspend return that error. One would handle and possibly return...
I was under the assumption that there are only two ways to introduce a suspend point: `suspend` and `await`. The former could return the error as noted earlier, and to...
Hm, forgot about compiler inserted awaits. The first bullet point sounds like the way to go there (the compiler adding `catch {}` to the inserted await's suspend point) which makes...
@EleanorNB why would implicit `catch {}` be a bad idea? I feel like running defers/errdefers on cancellation without any explicit returns or scope ending sounds much more error prone.
@EleanorNB > Discarding all errors from an operation I think there was a miss-comm. on my part. The await would return something like `error{Cancelled}!ReturnType` instead where ReturnType could be whatever...
> To my knowledge, nesting error sets is impossible The "is cancelled" state can then be switched to a bit in the frame state instead of a error set provided...
> What you get then is people saying that for safety, you should never try to cancel a frame. I don't really follow. `resume` depends on the state of the...
This also brings attention to the module documentation being old, noting RwLock requires runtime initialization. With a non-futex based implementation, leaky `pthread_rwlock_t` usage, and lack of `SRWLOCK`, zig's stdlib RwLocks...
@canselcik Zig temporarily removed async when it switched to stage2 post 0.10. There are plans to implement it again, but it's not yet a priority (currently, package manager & build...
FWIW, 5 iterations is a very small amount of work. This makes threads hit the sleeping path almost immediately and which ever sleeps faster under contention has higher throughput. parking_lot...