Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pike pike
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 107
    • Issues 107
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pikelang
  • pikepike
  • Issues
  • #7816

Multiple callbacks for Concurrent.Future

Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7816

Reported by Martin Karlgren marty@roxen.com

It seems Concurrent.Future only supports one callback at a time. This can lead to unexpected effects, because earlier set callbacks are silently cleared when a new one is set.

Concurrent.Future fut1 = ...
Concurrent.Future fut2 = future->flat_map(function1);
Concurrent.Future fut3 = future->flat_map(function2);

Only fut3 will yield a result because the callback used by the flat_map for fut2 is cleared.

It should be possible to store the callbacks in an array instead, right?

Assignee
Assign to
Time tracking