Skip to content

A wrapper around the Java 8 fences API for you to compile against.

License

Notifications You must be signed in to change notification settings

headius/unsafe-fences

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unsafe-fences

This library is very simple: it just provides a shim around the Java 8 Unsafe methods used for memory fencing. Because these methods do not exist in the Java 6 and Java 7 Unsafe, this library allows compiling those calls with a provided boolean guard.

This library must be built on Java 8 or a version of Java that has the three fence methods: fullFence, storeFence, and loadFence.

Usage

Simply use com.headius.unsafe.fences.UnsafeFences.SUPPORTS_FENCES and the shim *Fence methods to call the fence API safely across Java versions.

About

A wrapper around the Java 8 fences API for you to compile against.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages