The short question is - do future methods run in parallel, or sequentially?
I am wondering if race is possible in Salesforce. Let's say We've got some singleton class S
that we want to call from some future method f
, which is called few times in a loop like:
while(x)
f() // this future method calls our singleton S
The typical scenario here is that it is possible to break the singleton when it's not thread-safe and instantiate it more than once. It it possible in Apex?