Martin Sustrik

Results 159 comments of Martin Sustrik

Yes, that's clever. Conceptually, while the above may look like a cheap trick to avoid using choose(), one should visualize coroutine as a linear sequence of steps (the goal is...

There's a patch to make `choose` deterministic in deterministic-choose branch in case you want to review it. The reasoning is as follows: In golang, clause is chosen at random to...

Good idea. Done. If you want your micro-benchmarks included in the mainline, send me a pull request.

While we are dismantling the golang legacy: What's the use case for buffered channels? Quick web search yields this, but none of the use cases sounds really convincing: http://stackoverflow.com/questions/15113410/when-to-use-a-buffered-channel

With unbuffered channels, data is copied directly from sender's buffer to receiver's buffer. Therefore, channel needs no storage and no fixed item size. Just saying.

One more thought experiment with channels. Consider single message processor reading messages from a single channel written to by many clients. One would expect scheduler to be fair. In other...

> So another way of thinking about it is that the buffer (copying) can be described as a lightweight process (the memcpy essentially). The only difference is that the buffer...

> 3. Are there design patterns involving small cycles of resource contention which a buffer larger than the cycle would solve? Is there a way to solve it without using...

The tests have infinite timeouts. If DNS is not accessible, the test will hang.

First things first: Can you resolve www.example.org from the machine in question? `dig +short www.example.org`