S
SolidJS13mo ago
nzdeep

Is there any scenario where batch wouldn't be fully synchronize?

In that once the call to batch(() => { }) completes all signals inside that have been set can be read . i.e. there is no setImmediate/setTimeout/queueMicrotask in the path?
2 Replies
thetarnav
thetarnav13mo ago
well if you have batch inside of another batch it won't run any effects yet and other similar nestings but overall the system is synchronous and it doesn't use any setImmediate/setTimeout/queueMicrotask scheduling Also batch only prevents dependent computations to run, but the values of signals, and dependent memos will give you the updated value even if read during batch
nzdeep
nzdeep13mo ago
hmmm interesting.. I was thinking there might be scenarios where batch would delay the processing but batch within batch might be responsible for the issue I'm seeing, need to get a playground sorted