Skip to content

Add support for Promises (part 2) #9

Closed

Description

@rozele

In addition to supporting a promise data type in the ReactMethods, we should also add support for invoking asynchronous methods and chaining the result to a promise. This needs to be managed very carefully, as the native modules are run using the "AnyBackgroundThread" spec; the concern is that if the asynchronous call releases control too early, it may allow the next item in the native queue to execute.

Activity

  1. rozele commented on Feb 18, 2016

    @rozele
    ContributorAuthor

    Also, ensure that running asynchronous operations will not compromise the LimitedConcurrencyTaskScheduler.

  2. modified the milestones: , Core Framework - V1 on Feb 18, 2016
  3. rozele commented on Jun 7, 2016

    @rozele
    ContributorAuthor

    In general, this is not a good idea. Primarily because the user should be very conscious of what sort of asynchronous or blocking activities they are performing on one of the "main" module threads. In general, the guidelines are to move any asynchronous work off thread. It's fine to use async void, so long as the developer knows what they are doing (e.g., ensure use of ConfigureAwait(false) where necessary).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions