You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
The following example crashes the ParT:
It is most likely something that we are not tracing correctly, given that we use a big number of futures in the ParT.
The text was updated successfully, but these errors were encountered: