Sorry again. Well, I followed your advice. Here is the link
https://play.golang.org/p/7DigEVsKbdx
How can I cancel goToSleep() when timeout is reached?
El lunes, 24 de febrero de 2020, 14:16:32 (UTC-3), Jake Montgomery escribió:
>
> Your code will still not compile. In this group, it is often
FWIW, I also don't see any appreciable difference:
goos: windows
goarch: amd64
BenchmarkStateSet1-4 1368303 872 ns/op
BenchmarkStateSet2-4 1379320 887 ns/op
BenchmarkStateSet3-4 1343781 865 ns/op
PASS
ok command-line-arguments 7.446s
On
That's interesting!
My numbers earlier were from an AMD chip (2990WX) on Linux 5.3.11.
On an older Intel chip (i7-4960HQ) on macOS 10.15.3 I still see small a
difference but it's much smaller.
$ go test -bench .
goos: darwin
goarch: amd64
BenchmarkStateSet1-82737468 441 ns/op
maybe it's just your system?
master » gotip test -bench .
goos: linux
goarch: amd64
pkg: testrepo-75
BenchmarkStateSet1-44173546 273 ns/op
BenchmarkStateSet2-44547119 261 ns/op
BenchmarkStateSet3-44556757 263 ns/op
PASS
ok testrepo-75 4.899s
On Monday, February 2
Thanks for the pointers.
I was hoping for an easier answer. Maybe will look into patching stdlib.
Eric.
On Sat, Feb 22, 2020 at 1:15 AM Brian Candler wrote:
> Looks like your thoughts are the right ones:
>
> https://stackoverflow.com/questions/33436730/unmarshal-json-with-some-known-and-some-
Hi folks,
I was testing some code and I noticed something that struck me as little
odd. In the following code:
https://play.golang.org/p/z8OOCrnZ85s
we have routines Set1, Set2, and Set3. They do the same thing, but change
where time.Now().Unix() is called.
Set1 calls for the time before it
Your code will still not compile. In this group, it is often helpful to
include a link to your code in the playground (https://play.golang.org/)
using the "Share" button. That is in addition to, or instead of, posting
your code in the message. This will allow others to easily run your code,
but
Sorry}, here is the right code: ( just was the effect to b working til At
5:20am sleepy and lost)
Expected behaviour is to end anonyimous func when 3s timeout is reached.
//
package main
import(
//"fmt"
"time"
"math/rand"
"log"
)
func main()
> I've tried to adapt from from "Concurrency in Go by Katherine Cox-Buday" to
> understand how to apply timeout. But I don't get it.
What are you trying to do? What is the expected behaviour, what happens instead?
BTW, this code does not compile, there are same unbalanced curly brackets.
Lutz
Hi everybody,
I've tried to adapt from from "Concurrency in Go by Katherine Cox-Buday" to
understand how to apply timeout. But I don't get it. What I'm doing
wrong? Here the code:
package main
import(
//"fmt"
"time"
"math/rand"
"log"
)
On Saturday, February 22, 2020 at 5:00:33 AM UTC+1, howar...@gmail.com
wrote:
>
>
> I have updated it to support go modules, and added support for the
> recently appearing Gio and Fyne GUI toolkits. They are both operational, if
> a bit oddly. I tested Gio on Windows yesterday when I had a cha
11 matches
Mail list logo