Giter VIP home page Giter VIP logo

cache-example's Issues

安装 bigCache 一直失败

老师请问一下, 为什么我按照书里面的命令安装bigCache 一直404, 不加版本号的话一直下载的是 1.2.1 版本, 加了 -u 参数也是, 加版本号完全下载不了最新的, 2.2.0 也不行, 用的七牛云的国内代理, 难道一定要科学上网才行吗?

FastCache datarace

如題所述,fast/shard.go好像怪怪的,是不是要用Lock而不是RLock?還是我誤解了什麼?

WARNING: DATA RACE
Read at 0x00c00014ed88 by goroutine 112:
  container/list.(*List).MoveToBack()
      /usr/local/go/src/container/list/list.go:197 +0x4b8
  test/fast.(*cacheShard).get()
      /home/runner/test/fast/shard.go:63 +0x12b
  test/fast.(*fastCache).Get()
      /home/runner/test/fast/cache.go:32 +0xd8
  test.BenchmarkT.func2()
      /home/runner/test/main_test.go:17 +0x90

Previous write at 0x00c00014ed88 by goroutine 58:
  container/list.(*List).move()
      /usr/local/go/src/container/list/list.go:131 +0x3e6
  container/list.(*List).MoveToBack()
      /usr/local/go/src/container/list/list.go:201 +0x20d
  test/fast.(*cacheShard).get()
      /home/runner/test/fast/shard.go:63 +0x12b
  test/fast.(*fastCache).Get()
      /home/runner/test/fast/cache.go:32 +0xd8
  test.BenchmarkT.func2()
      /home/runner/test/main_test.go:17 +0x90

Goroutine 112 (running) created at:
  test.BenchmarkT()
      /home/runner/test/main_test.go:16 +0xc3
  testing.(*B).runN()
      /usr/local/go/src/testing/benchmark.go:191 +0x1b4
  testing.(*B).launch()
      /usr/local/go/src/testing/benchmark.go:321 +0x15c

Goroutine 58 (finished) created at:
  test.BenchmarkT()
      /home/runner/test/main_test.go:16 +0xc3
  testing.(*B).runN()
      /usr/local/go/src/testing/benchmark.go:191 +0x1b4
  testing.(*B).launch()
      /usr/local/go/src/testing/benchmark.go:321 +0x15c
==================
==================
WARNING: DATA RACE
Read at 0x00c000148248 by goroutine 67:
  container/list.(*List).MoveToBack()
      /usr/local/go/src/container/list/list.go:197 +0x4b8
  test/fast.(*cacheShard).get()
      /home/runner/test/fast/shard.go:63 +0x12b
  test/fast.(*fastCache).Get()
      /home/runner/test/fast/cache.go:32 +0xd8
  test.BenchmarkT.func2()
      /home/runner/test/main_test.go:17 +0x90

Previous write at 0x00c000148248 by goroutine 51:
  [failed to restore the stack]

Goroutine 67 (running) created at:
  test.BenchmarkT()
      /home/runner/test/main_test.go:16 +0xc3
  testing.(*B).runN()
      /usr/local/go/src/testing/benchmark.go:191 +0x1b4
  testing.(*B).launch()
      /usr/local/go/src/testing/benchmark.go:321 +0x15c

Goroutine 51 (finished) created at:
  test.BenchmarkT()
      /home/runner/test/main_test.go:16 +0xc3
  testing.(*B).runN()
      /usr/local/go/src/testing/benchmark.go:191 +0x1b4
  testing.(*B).launch()
      /usr/local/go/src/testing/benchmark.go:321 +0x15c
........略

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.