Skip to content

Disable polyester threads if in an outer @batch loop #155

@tetrakai1

Description

@tetrakai1

The readme gives this example, which works great:

disable_polyester_threads() do
    @threads for i in 1:n
        f()
    end
end

For my use case, I would like to disable an inner @batch in f() if the outer loop uses @batch. Eg,:

disable_polyester_threads() do
    @batch for i in 1:n
        f()
    end
end

Is there an easy way to do this? Thanks.

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