Guest User

Untitled

a guest
Sep 20th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. public class Foo {
  2. static {
  3. System.loadLibrary("foo");
  4. }
  5.  
  6. public void bar() {
  7. lockMe();
  8. }
  9.  
  10. private void spinWait() {
  11. while (true) {
  12. // burn some CPU
  13. int i = 0;
  14. i++;
  15. }
  16. }
  17.  
  18. public native void lockMe();
  19. }
Add Comment
Please, Sign In to add comment