I must have missed this but just clarify my thoughts are all file reads async now? That would a pretty big deal for apps that read a lot of files.
tors 15 juni 2017 kl 19:30 skrev Ian Lance Taylor <i...@golang.org>: > On Thu, Jun 15, 2017 at 7:37 AM, <pmor...@gmail.com> wrote: > > > > With go1.9beta1 (Linux / amd64) I noticed an extra file descriptor that I > > cannot explain. > > A simple example is after calling ioutil.ReadDir(). > > > > package main > > import ( > > > > "fmt" > > > > "io/ioutil" > > > > ) > > > > func main() { > > > > _, err := ioutil.ReadDir(".") > > > > if err != nil { > > > > panic(err) > > > > } > > > > fmt.Scanln() > > > > } > > > > > > sudo lsof -p `pidof fd-go1.9beta1` > > COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME > > fd-go1.9b 3698 peter cwd DIR 8,2 4096 23596911 > > /home/peter/go/src/fd > > fd-go1.9b 3698 peter rtd DIR 8,2 4096 2 / > > fd-go1.9b 3698 peter txt REG 8,2 1964089 23596832 > > /home/peter/go/src/fd/fd-go1.9beta1 > > fd-go1.9b 3698 peter 0u CHR 136,1 0t0 4 /dev/pts/1 > > fd-go1.9b 3698 peter 1u CHR 136,1 0t0 4 /dev/pts/1 > > fd-go1.9b 3698 peter 2u CHR 136,1 0t0 4 /dev/pts/1 > > fd-go1.9b 3698 peter 4u a_inode 0,12 0 9667 [eventpoll] > > > > FD #4 doesn't show up with go1.8.3. Is this expected, a bug or something > > else? > > In 1.9 the os package now uses the event poller that the net package > has always used. > > I sent https://golang.org/cl/45910 to add that to the release notes. > > Ian > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.