Coder Social home page Coder Social logo

Comments (6)

baozhi avatar baozhi commented on July 19, 2024 3

@contended是java8官方解决方案,但对于user classpath加载的类,需要配合-XX:-RestrictContendedJVM启动参数。
为了不强制JVM启动参数、以及便于应用者适配jdk7,故未采用@contended

谢谢!

from uid-generator.

Yaccc avatar Yaccc commented on July 19, 2024

可是你们的代码里面到处都是jdk8的语法,怎么兼容jdk7?

from uid-generator.

Yaccc avatar Yaccc commented on July 19, 2024

image
而且updateAndGet只有jdk8的api有

from uid-generator.

baozhi avatar baozhi commented on July 19, 2024

image
对,updateAndGetJDK8才有,但是内部实现用到的get()``compareAndSet(long expect, long update)都是JDK7兼容的

其余用到lambda、@FunctionalInterface都是比较好替换的

from uid-generator.

baozhi avatar baozhi commented on July 19, 2024

先关了,有问题新开issue讨论
@Yaccc 期待美团的开源,互相学习优秀的代码^_^

from uid-generator.

Yaccc avatar Yaccc commented on July 19, 2024

@baozhi 顺便搭车问一下dlock的续租怎么保证一定成功的

from uid-generator.

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.