Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-10679

WorkManager should allow Work execution to be delayed after the transaction commit

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.7.1
    • Component/s: Core
    • Impact type:
      API added
    • Upgrade notes:
      Hide

      New WorkManager APIs:

      • void schedule(Work work, boolean afterCommit)
      • void schedule(Work work, Scheduling scheduling, boolean afterCommit)
      Show
      New WorkManager APIs: void schedule(Work work, boolean afterCommit) void schedule(Work work, Scheduling scheduling, boolean afterCommit)

      Description

      Many Work instances will need to read data written by the main thread that created the work instance. In order for the work instance to see this data, the main thread must have committed its transaction.

      This means that submitting Work to the WorkManager must, in most cases, be delayed until after transaction commit.

      (We should leave the possibility though to execute the Work instance as soon as possible without waiting for transaction commit, in the case where the work instance does not care about it.)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                fguillaume Florent Guillaume
                Reporter:
                fguillaume Florent Guillaume
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: