Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Foo {
- static {
- System.loadLibrary("foo");
- }
- public void bar() {
- lockMe();
- }
- private void spinWait() {
- while (true) {
- // burn some CPU
- int i = 0;
- i++;
- }
- }
- public native void lockMe();
- }
Add Comment
Please, Sign In to add comment