Replace process.nextTick() with .queueMicrotask()

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Unknown
    • 7.1.0
    • Affects Version/s: None
    • Component/s: None
    • 5
    • Not Needed
    • 🔵 Done
    • Hide

      Create a copy of the Kickoff Template with the issue key (NODE-XXX) in the filename and share a link to the new doc via this field.

      Show
      Create a copy of the Kickoff Template with the issue key (NODE-XXX) in the filename and share a link to the new doc via this field.
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Use Case

      As a... bundling user of the Node driver
      I want... node-specific APIs (process.nextTick) to be replaced with non-node specific ones (queueMicrotask)
      So that... bundling is easier

      User Experience

      • process.nextTick isn't used in the driver

      Dependencies

      • N/A

      Risks/Unknowns

      • We have to be very careful with timing - for each instance of usage, consider whether moving the execution in the event loop will make a difference

      Acceptance Criteria

      Implementation Requirements

      • Review Node.js event loop fundamentals (specifically relative to nextTick and queueMicrotask)
      • Replace process.nextTick() with queueMicrotask() (or another alternative)
      • Ask Anna for review

      Testing Requirements

      • Existing tests pass

      Documentation Requirements

      • Release note

      Follow Up Requirements

      • Regression testing is deferred to a consolidated follow up ticket for M0

            Assignee:
            Pavel Safronov
            Reporter:
            Sergey Zelenov
            Sergey Zelenov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: