How many task can you create (related to wold age)?

[Possible should be in internals category?]

I see the world age is increased when I create tasks so I ask, and world age is an UInt i.e. 32-bit on 32-bit platforms.

Certain language features capture the current task’s world age. Perhaps the most common of these is creation of new tasks. Newly created tasks will inherit the creating task’s local world age at creation time and will retain said world age (unless explicitly raised)

I’m just thinking what happens if world age overflows? Should it be UInt64 on all platforms (maybe introduces other problem, also not likely to overflow)? Or even just Int[64] since I see it casted to Int in docs… which is likely always ok except maybe on 32-bit. [I think just for more friendly printing, so is there a way to print in plain decimal without simply casting to Signed with Int?]

Task creation does not increase the world-age. If you observe this it is likely due to working in the REPL.

Tasks capture the world-age, but that is different from incrementing it.

4 Likes