Skip to content

Avoiding abort() when the scheduler queue overflows #99

Description

@Xinjian-Jiang

work_stealing_deque::push_bottom() currently calls abort() when the local deque reaches its fixed capacity.

This means sufficiently deep nested parallelism can terminate the whole program even though execution could safely fall back to sequential execution.

One possible fix is:

  • Change push_bottom() to return an additional success flag(pair<bool, bool>), which is false when the scheduler queue overflows.
  • Propagate this flag through scheduler::spawn.
  • In pardo(), if spawning the right task fails, execute left and then execute right directly on the current worker, and return.

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