Skip to content

Specialize Deferred for IO to use CallbackStack #3271

@djspiewak

Description

@djspiewak

The get function on Deferred relies on notifying listeners of the fulfillment of a write-once memory slot. This is startlingly similar to the implementation of join in IOFiber, except that IOFiber uses a dramatically more optimized data structure than what we find in Deferred. In theory, it should be possible for us experiment with overriding Concurrent[IO].deferred with a custom implementation (IODeferred?) which in turn uses the CallbackStack data structure from IOFiber itself. We should benchmark whether this is actually faster (it should be!) and by how much.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions