Package totalcross.util.concurrent
Class Lock
- java.lang.Object
-
- totalcross.util.concurrent.Lock
-
public class Lock extends java.lang.ObjectClass used with thesynchronizekeyword, representing a lock to avoid concurrent access. Here's a sample:Lock lock1 = new Lock(); // usually a class' field synchronized (lock1) { ... }Only a Lock object can be used withsynchronize. Usingthiswill abort the tc.Deploy and using other objects will cause a RuntimeException during code execution under the TCVM.- Since:
- TotalCross 1.2
-
-
Constructor Summary
Constructors Constructor Description Lock()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfinalize()
-