GithubHelp home page GithubHelp logo

Data race about promptui HOT 1 CLOSED

manifoldco avatar manifoldco commented on May 29, 2024 4
Data race

from promptui.

Comments (1)

hallazzang avatar hallazzang commented on May 29, 2024

FYI, on my machine I get:

==================
WARNING: DATA RACE
Read at 0x00c420010160 by main goroutine:
  github.com/manifoldco/promptui.(*Prompt).Run()
      /Users/halla/Documents/Develop/Golang/src/github.com/manifoldco/promptui/prompt.go:197 +0x7b1
  main.main()
      /Users/halla/Develop/Golang/src/github.com/hallazzang/tests/promptui-issue55/main.go:25 +0x112

Previous write at 0x00c420010160 by goroutine 17:
  github.com/manifoldco/promptui.(*Prompt).Run.func2()
      /Users/halla/Documents/Develop/Golang/src/github.com/manifoldco/promptui/prompt.go:139 +0xa7b
  github.com/chzyer/readline.(*DumpListener).OnChange()
      /Users/halla/Documents/Develop/Golang/src/github.com/chzyer/readline/operation.go:516 +0x96
  github.com/chzyer/readline.(*Operation).ioloop()
      /Users/halla/Documents/Develop/Golang/src/github.com/chzyer/readline/operation.go:339 +0x771

Goroutine 17 (running) created at:
  github.com/chzyer/readline.NewOperation()
      /Users/halla/Documents/Develop/Golang/src/github.com/chzyer/readline/operation.go:88 +0x7f6
  github.com/chzyer/readline.(*Terminal).Readline()
      /Users/halla/Documents/Develop/Golang/src/github.com/chzyer/readline/terminal.go:95 +0x53
  github.com/chzyer/readline.NewEx()
      /Users/halla/Documents/Develop/Golang/src/github.com/chzyer/readline/readline.go:167 +0x62
  github.com/manifoldco/promptui.(*Prompt).Run()
      /Users/halla/Documents/Develop/Golang/src/github.com/manifoldco/promptui/prompt.go:114 +0x1e9
  main.main()
      /Users/halla/Develop/Golang/src/github.com/hallazzang/tests/promptui-issue55/main.go:25 +0x112

When I run the basic example using following commands:

$ go build -race main.go  # In this step, there's no output
$ go run -race main.go  # It spits out the message above

from promptui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.