Skip to content

Changelog for https://github.com/cloudflare/workerd/pull/7053 #32869

Open

Description

@irvinebroque

Proposed changes

here is a draft of a changelog for cloudflare/workerd#7053

Create AbortSignals outside request handlers in the Workers runtime

You can now create AbortController and AbortSignal objects during module initialization in Cloudflare Workers:

const controller = new AbortController();
const alreadyCancelled = AbortSignal.abort("cancelled");

export default {
  async fetch() {
    return Response.json({
      cancelled: alreadyCancelled.aborted,
    });
  },
};

This change brings Workers in line with browsers and Node.js. Libraries can now create controllers, requests, and writable streams when you import them without encountering an IoContext error.

You can also observe or abort a signal from a different request running in the same isolate. Workerd routes cancellation to the request that owns each pending operation.

Do not use isolate-local signals when your application requires durable cancellation. Cloudflare may route requests to another isolate or restart an isolate at any time. Use a Durable Object to coordinate those requests.

AbortSignal.timeout() still requires an active request because it schedules a timer.

More consistent event handling

This change also aligns EventTarget behavior with the DOM standard:

  • One listener throwing an exception no longer prevents later listeners from running.
  • abort() no longer throws when an abort listener throws.
  • Workerd reports listener exceptions through the global error event and console.
  • Workerd removes listeners registered with { signal } before it runs abort listeners.
  • Events you construct report isTrusted === false.

Most applications require no changes.

Subject Matter

cloudflare/workerd#7053

Content Location

new changelog. also research docs if there is anything we need to update, like warnings saying that you can't do what is now possible

Additional information

No response

Activity

  1. irvinebroque commented on Aug 19, 2026

    @irvinebroque
    ContributorAuthor

    /bonk

  2. irvinebroque commented on Aug 19, 2026

    @irvinebroque
    ContributorAuthor
  3. ask-bonk commented on Aug 19, 2026

    @ask-bonk
    Contributor

    This issue proposes adding a changelog entry for cloudflare/workerd#7053, which enables creation of AbortController and AbortSignal objects during module initialization in Cloudflare Workers.

    Key points of the proposed change:

    • Workers can now create AbortController/AbortSignal outside request handlers (e.g., at module import time), aligning with browsers and Node.js
    • Libraries can create controllers, requests, and writable streams on import without IoContext errors
    • Cross-request signal observation within the same isolate is now possible
    • AbortSignal.timeout() still requires an active request (it schedules a timer)
    • Includes DOM-standard alignment for EventTarget behavior (listener exceptions, abort listener ordering, isTrusted === false)

    Request: Create a new changelog entry and review existing docs for outdated warnings that say this wasn't previously possible.

    github run

  4. irvinebroque commented on Aug 19, 2026

    @irvinebroque
    ContributorAuthor

    /bonk please fix this issue by making a changelog and any relevant docs updates, make a pr for this

  5. ask-bonk commented on Aug 19, 2026

    @ask-bonk
    Contributor

    Created PR #32870

    github run

  6. jasnell commented on Aug 19, 2026

    @jasnell
    Contributor

    hmm, I already had one: #32863

  7. github-actions commented on Oct 6, 2026

    @github-actions
    Contributor

    Hey there, we've marked this issue as stale because there's no recent activity on it. This label helps us identify long-standing issues in our repo (and not used to auto-close issues).

  8. neelakolkar-cf commented on Oct 13, 2026

    @neelakolkar-cf
    Collaborator

    Tracking via #32863

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions