-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Description
原来:
// spin get next available cursor
long currentCursor = cursor.get();
long nextCursor = cursor.updateAndGet(old -> old == tail.get() ? old : old + 1);
// trigger padding in an async-mode if reach the threshold
long currentTail = tail.get();
改成下面这样是否可以???
// spin get next available cursor
long currentCursor = cursor.get();
long currentTail = tail.get();
long nextCursor = currentCursor;
if (currentCursor != currentTail) {
nextCursor = cursor.incrementAndGet();
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

