The short answer is yes, but not in this example.
In your example the inline doesn't happen because `foo` is (barely) too
complex so it is not inlined and the closure remains a parameter:
```
go build -gcflags=-m=2 main.go
# command-line-arguments
./main.go:3:6: cannot inline foo: function too co
Accept() can return an "i/o timeout" (os.ErrDeadlineExceeded) if your
listener has set a deadline via SetDeadline()
(e.g. https://pkg.go.dev/net#TCPListener.SetDeadline for a TCP listener)
On Wednesday, 25 October 2023 at 10:00:11 UTC-7 whileloop wrote:
> Hi community,
>
> I am quite stumped by
Hi community,
I am quite stumped by this error that I am getting intermittently on my Go
server running on Ubuntu.
The following code logs the error:
conn, err := listener.Accept()
if err != nil {
log.Error(err)
}
Output:
accept tcp [::]:42796: i/o timeout
I have never seen an i/o timeout on a
Just my guess:
- when use IEE754, 18446744073709551615 will be actual stored as
18446744073709551616 (> 2<<64)
- so uint64(float64(18446744073709551615)) is overflow and undefined
Code:
// true
fmt.Println(uint64(float64(18446742974197923840)) ==
uint64(18446742974197923840))
// cannot convert f
Float64Bits preserves the underlying representation. The numeric value of the
uint64 it returns has little significance. You’d typically use it when
serializing floats, when wanting to make manual changes to the float’s
representation, and so on.
uint64(f) cares about preserving the numeric val
On Wed, Oct 25, 2023 at 9:58 AM Domenico Andreoli <
domenico.andre...@linux.com> wrote:
> On Tue, Oct 24, 2023 at 09:58:22AM -0700, 'Bryan C. Mills' via golang-nuts
> wrote:
> > If a C thread calls into Go, the goroutine processing that call (and
> only
> > that goroutine) will run on the C thread
On Tue, Oct 24, 2023 at 09:58:22AM -0700, 'Bryan C. Mills' via golang-nuts
wrote:
> If a C thread calls into Go, the goroutine processing that call (and only
> that goroutine) will run on the C thread. The Go runtime will initialize
Is this thanks to the `lockOSThread` call in function `cgocall
Hi Guys, recently, I've been learning the number types conversion. I
learned about the ieee 754 round to even when golang converts from uint64
to float64.
However, when I want to convert the float64 to uint64 back, there is a
different between functions: `math.Float64Bits` and use `uint64(f)`.