org.lwjgl.util.mapped
Annotation Type CacheLinePad


@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface CacheLinePad

When this annotation is used on a field, automatic cache-line-sized padding will be inserted around the field. This is useful in multi-threaded algorithms to avoid cache line false sharing. The annotation defaults to padding after the field, but can be changed to before or both before and after. It can be applied to both mapped object fields and POJO primitive fields.

Author:
Spasi

Optional Element Summary
 boolean after
          When true, cache-line padding will be inserted after the field.
 boolean before
          When true, cache-line padding will be inserted before the field.
 

before

public abstract boolean before
When true, cache-line padding will be inserted before the field.

Returns:
Default:
false

after

public abstract boolean after
When true, cache-line padding will be inserted after the field.

Returns:
Default:
true


Copyright © 2002-2009 lwjgl.org. All Rights Reserved.