SQLiteDatabase.YieldIfContendedSafely Method

Definition

Overloads

YieldIfContendedSafely()

Temporarily end the transaction to let other threads run.

YieldIfContendedSafely(Int64)

Temporarily end the transaction to let other threads run.

YieldIfContendedSafely()

Temporarily end the transaction to let other threads run.

[Android.Runtime.Register("yieldIfContendedSafely", "()Z", "GetYieldIfContendedSafelyHandler")]
public virtual bool YieldIfContendedSafely ();

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 assumes that there are no nested transactions (beginTransaction has only been called once) and will throw an exception if that is not the case.

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

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

.NET for Android .NET for Android API 35 and .NET for Android .NET for Android API 34
Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35

YieldIfContendedSafely(Int64)

Temporarily end the transaction to let other threads run.

[Android.Runtime.Register("yieldIfContendedSafely", "(J)Z", "GetYieldIfContendedSafely_JHandler")]
public virtual bool YieldIfContendedSafely (long sleepAfterYieldDelay);

Parameters

sleepAfterYieldDelay
Int64

if > 0, sleep this long before starting a new transaction if the lock was actually yielded. This will allow other background threads to make some more progress than they would if we started the transaction immediately.

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 assumes that there are no nested transactions (beginTransaction has only been called once) and will throw an exception if that is not the case.

Java documentation for android.database.sqlite.SQLiteDatabase.yieldIfContendedSafely(long).

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

.NET for Android .NET for Android API 35 and .NET for Android .NET for Android API 34
Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35