Results 1 to 3 of 3
Thread: TASLock in concurrency
- 01-19-2013, 12:43 AM #1
Member
- Join Date
- Jan 2013
- Posts
- 1
- Rep Power
- 0
TASLock in concurrency
public class TASLock implements Lock {
AtomicBoolean state = new AtomicBoolean(false);
public void lock() {
while (state.getAndSet(true)) {}
}
public void unlock() {
state.set(false);
}
}
hello this is the code written in java..i am not fiding the way how to implement this...its a lock functioning on crictical section.
kindly help
thank you
- 01-19-2013, 07:13 AM #2
Re: TASLock in concurrency
If you're forever cleaning cobwebs, it's time to get rid of the spiders.
- 01-19-2013, 07:14 AM #3
Similar Threads
-
Java in Concurrency
By bernerd in forum Advanced JavaReplies: 0Last Post: 10-03-2011, 09:20 AM -
A set of questions on concurrency.
By KutaBeach in forum Threads and SynchronizationReplies: 1Last Post: 07-22-2011, 05:21 PM -
Practicing Concurrency
By sunde887 in forum New To JavaReplies: 1Last Post: 06-21-2011, 04:27 AM -
GUI Concurrency Problems
By jkhamler in forum Threads and SynchronizationReplies: 18Last Post: 01-20-2010, 04:40 PM -
concurrency question
By diggitydoggz in forum New To JavaReplies: 4Last Post: 01-17-2009, 04:48 AM
Bookmarks