Daniel Urban

Results 175 comments of Daniel Urban

A question: the `getAndSet`, `modify`, and similar methods look like the ones on `Ref`. However, here they are not atomic, right? So having them could be somewhat misleading. (While having...

I don't think we can make them atomic. Or do you know a way?

I'd just go with get, set and remove. If that's the functionality offered by the platform, and we can't provide atomicity, its best simply to wrap those.

I'm nitpicking, but I don't think the VPA actually dynamically changes container resources. Based on the documentation, it seems to recreate pods with the changed resources. However, it _is_ possible...

I can't reproduce this (I get `OutOfMemoryError`s), but that exception more or less seems like what should happen if the size (`stack(0)`) overflowed from `Int.MaxValue` to `Int.MinValue`. If in `push`...

We could detect the overflow earlier, by using `Math.addExact`.

I think it's hard to do this right, but probably worth it. Even a somewhat informal description is probably better than nothing (which is the current situation). One of the...

> Memory consistency effects: Actions in a thread prior to calling a "release" method such as release() happen-before actions following a successful "acquire" method such as acquire() in another thread....

> Particularly Ref is the important building block: until we specify its memory effects, we are helpless to say anything about the semantics of a Concurrent-based Semaphore. Yeah. The rule...

Just a note, `memory_order_consume` in C++ seems to be a mess (well... what isn't? ;-). > It is widely accepted that the current definition of `memory_order_consume` in the standard is...