[合集] code sample from the book written by core designers of java# Java - 爪哇娇娃
I*e
1 楼
☆─────────────────────────────────────☆
smectite (coolrant) 于 (Thu Aug 9 20:45:48 2007) 提到:
Saw the following code from book written by guys who developed new
concurrency model for sun.
public abstract class BaseBoundedBuffer {
@GuardedBy("this") private final V[] buf;
@GuardedBy("this") private int tail;
@GuardedBy("this") private int head;
@GuardedBy("this") private int count;
protected BaseBoundedBuffer(int capacity) {
this.buf = (V[]) new Object[capacity
smectite (coolrant) 于 (Thu Aug 9 20:45:48 2007) 提到:
Saw the following code from book written by guys who developed new
concurrency model for sun.
public abstract class BaseBoundedBuffer
@GuardedBy("this") private final V[] buf;
@GuardedBy("this") private int tail;
@GuardedBy("this") private int head;
@GuardedBy("this") private int count;
protected BaseBoundedBuffer(int capacity) {
this.buf = (V[]) new Object[capacity