Git Product home page Git Product logo

Comments (7)

matwachich avatar matwachich commented on May 25, 2024 1

I think I solved this by calling hardwareID functions inside a goroutine that I lock on thread (runtime.LockOSThread)

from ghw.

longit123 avatar longit123 commented on May 25, 2024

it is easy to appear after calling multiple times

gpu, err := ghw.GPU()

from ghw.

jaypipes avatar jaypipes commented on May 25, 2024

@longit123 does this only happen when calling the GPU function or does this happen when you call any ghw function on Windows?

from ghw.

longit123 avatar longit123 commented on May 25, 2024

I am using wails + front-end development. Wails will monitor file updates during development and then perform hot updates. When I did not use ghw before, this problem did not occur. After using ghw, this problem will appear. After I Googled it, it may be due to the use of wails webview2, caused by hot update, I don't know how to solve this problem

from ghw.

longit123 avatar longit123 commented on May 25, 2024

https://wails.io/docs/howdoesitwork/

from ghw.

jaypipes avatar jaypipes commented on May 25, 2024

ghw does not write any files so I don't believe the file monitoring that Wails (or Vite) does is part of this. I suspect this may be a problem with the go-ole/go-ole library that the StackExchange/wmi dependency uses. Unfortunately, I don't know if there's anything that ghw can do to address this issue :(

from ghw.

jaypipes avatar jaypipes commented on May 25, 2024

Please see this related thread in another project that uses WMI/go-ole:

shirou/gopsutil#692

from ghw.

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.