room/runtime/src/main/java/androidx/room/RoomDatabase.java
public void runInTransaction(@NonNull Runnable body) {
        beginTransaction();
        try {
            body.run();
            setTransactionSuccessful();
        } finally {
            endTransaction();
        }
    }
/**
     * Executes the specified {@link Runnable} in a database transaction. The transaction will be
     * marked as successful unless an exception is thrown in the {@link Runnable}.
     *
     * @param body The piece of code to execute.
     */
Executes the specified  Runnable in a database transaction. The transaction will be
marked as successful unless an exception is thrown in the  Runnable.

@param body The piece of code to execute.
Executes the specified Runnable in a database transaction . The transaction will be marked as successful unless an exception is thrown in the Runnable . @param body The piece of code to execute .
public void runInTransaction(@NonNull Runnable body) {
        beginTransaction();
        try {
            body.run();
            setTransactionSuccessful();
        } finally {
            endTransaction();
        }
    }
public void runInTransaction ( @ NonNull Runnable body ) { beginTransaction ( ) ; try { body . run ( ) ; setTransactionSuccessful ( ) ; } finally { endTransaction ( ) ; } }
Executes the specified {@link Runnable} in a database transaction.
Executes the specified { @link Runnable } in a database transaction .