Skip to content

Add a timeout option for force #21

Open

Description

@tmccombs

It would be nice to have a way for force to timeout while waiting for a promise to be fulfilled.

Activity

  1. lmj commented on Feb 26, 2016

    @lmj
    Owner

    Yes I had been thinking about try-force -- it's not in yet because the timeout option in bordeaux-threads is relatively recent and lparallel doesn't yet require it. Since futures can return multiple values, try-force may be a bit cumbersome, though, like (multiple-value-bind (vals success) (try-force f) ...).

  2. lmj commented on Feb 27, 2016

    @lmj
    Owner

    This requires an additional slot for a condition variable in the future struct, which may be another reason that I avoided it. As with queues the cvar would be lazily created, but futures would be a little heavier nonetheless. Benchmarks probably won't be affected where waiting with timeout is never done.

  3. tmccombs commented on Feb 29, 2016

    @tmccombs
    Author

    One to deal with muliple values could be to signal a condition on a timeout, but that would be more cumbersome for the user to handle, and would be inconsistent with the timeout behavior for queues.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions