Udostępnij za pośrednictwem


SQLiteDatabase.YieldIfContended Method

Definition

Caution

deprecated

Temporarily end the transaction to let other threads run.

[Android.Runtime.Register("yieldIfContended", "()Z", "GetYieldIfContendedHandler")]
[System.Obsolete("deprecated")]
public virtual bool YieldIfContended ();
[<Android.Runtime.Register("yieldIfContended", "()Z", "GetYieldIfContendedHandler")>]
[<System.Obsolete("deprecated")>]
abstract member YieldIfContended : unit -> bool
override this.YieldIfContended : unit -> bool

Returns

true if the transaction was yielded

Attributes

Remarks

Temporarily end the transaction to let other threads run. The transaction is assumed to be successful so far. Do not call setTransactionSuccessful before calling this. When this returns a new transaction will have been created but not marked as successful.

This member is deprecated. if the db is locked more than once (because of nested transactions) then the lock will not be yielded. Use yieldIfContendedSafely instead.

Java documentation for android.database.sqlite.SQLiteDatabase.yieldIfContended().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to