#Static data inside managed jobs?

1 messages · Page 1 of 1 (latest)

deep hinge
frank pawn
#

I don't have a good timeline for when this would be removed, however if you Burst compile your jobs, you are not allowed to refer to static data so you do have a shortcut to disallowing statics usage in jobs.

ripe marsh
#

You are allowed static readonly data though right? Because burst handles that by copying it

frank pawn
#

Correct. static readonly is ok as that data is ensured to be immutable.

Technically you can even get mutable static data in a burst job using Burst SharedStatics as those allow for a static readonly indirection to native memory (so the ptr is immutable but not the data). However I would not recommend that for general use, but a good tool to have in case you have a particular use case