Skip to content

Commit

Permalink
Migrate Continuation to kotlin (#47537)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #47537

Migrate Continuation interface to kotlin

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D65738326

fbshipit-source-id: 1a119f6d349101951dc528583f3dbaf5441da91e
  • Loading branch information
mdvacca authored and facebook-github-bot committed Nov 11, 2024
1 parent 17b6979 commit b8337eb
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,16 @@
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.runtime.internal.bolts;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
package com.facebook.react.runtime.internal.bolts

/**
* A function to be called after a task completes.
*
* <p>If you wish to have the Task from a Continuation that does not return a Task be cancelled then
* throw a {@link java.util.concurrent.CancellationException} from the Continuation.
* throw a [java.util.concurrent.CancellationException] from the Continuation.
*
* @see Task
*/
public interface Continuation<TTaskResult, TContinuationResult> {
@Nullable
TContinuationResult then(@NonNull Task<TTaskResult> task) throws Exception;
@Throws(Exception::class) public fun then(task: Task<TTaskResult>): TContinuationResult?
}

0 comments on commit b8337eb

Please sign in to comment.