Java

AtomicInteger & atomics

Në shqip: AtomicInteger

ShpjegimiSQ

AtomicInteger është një numër që mund ta rrisin shumë thread-e njëkohësisht pa gabime dhe pa synchronized — incrementAndGet() ndodh i plotë, pa ndërprerje.

EnglishEN

AtomicInteger is a number several threads can increase at the same time without errors and without synchronized — incrementAndGet() happens in one go, without interruption.

Si ta mendosh

Si numëruesi automatik në portën e stadiumit.

Lexoje në anglisht

Like the automatic counter at a stadium gate.

Shembull kodijava

AtomicInteger vizitore = new AtomicInteger();
vizitore.incrementAndGet();

Terma të lidhur