forked from parapluu/encore
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The following example crashes the ParT:
import Task
import ParT.ParT
read class MyObject
val id : int = 0
def init(id: int): unit
this.id = id
end
def value(): int
this.id
end
def inc(): uint
EMBED (uint)
// safely cheating to increment the counter
#{this.id} = #{this.id} + 1;
END
end
end
fun generateObjects(number: uint): Par[int]
var p = empty[MyObject]()
for i <- [0..number] do
p = p ||| liftf(async(new MyObject(i)))
end
-- TODO: there seems to be an issue with >>, futures and the running closure.
-- this crashes the program.
p >> fun (m : MyObject) => m.id
end
active class Main
def main(): unit
for i <- extract(generateObjects(10000)) do
print("{}, ", i.id)
end
end
end
It is most likely something that we are not tracing correctly, given that we use a big number of futures in the ParT.
Metadata
Metadata
Assignees
Labels
No labels