Skip to content

Copy args  #142

Closed
Closed
@FredericWantiez

Description

@FredericWantiez

Seems like #141 has a small issue with copying the args around. From the last update:

function f(x)
  for i in 1:3
    produce(i + x)
  end
end

ttask = TapedTask(f, 1)
consume(ttask) # 2

ttask2 = copy(ttask)
consume(ttask2) # 3

ttask3 = copy(ttask; args=(5,))
consume(ttask3) # 3 (!!) x is still 1

but this runs fine

function f(x)
  for i in 1:3
    produce(i + x)
  end
end

ttask = TapedTask(f, 1)

ttask2 = copy(ttask)
consume(ttask2) # 2

ttask3 = copy(ttask; args=(5,))
consume(ttask3) # 6 correct update

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