@Override
	public boolean lock() {
		int threadid = ((HMThread) Thread.currentThread()).getThreadId();
		//System.out.println("threadid: " + threadid + " and lockholder " + lockholder.get());
		return lockholder.compareAndSet(-1, threadid);
	}