7
$\begingroup$

Example

SessionSubmit @ Print @ $SynchronousEvaluation 

Will print False even though ref/SessionSubmit/Details last point:

The task is run preemptively, both when the system is waiting for input and during other evaluations.

And ref/$SynchronousEvaluation/Details 3rd point:

synchronous evaluation is the same as a preemptive evaluation.

Question

  • I expected True. Is this a bug or is it a documentation inconsistency (see below).

Further thoughts

Following notes are only loosely connected to the main question so one does not need to read further.

Next point in $SynchronousEvaluation says:

Synchronous evaluations halt the system while being evaluated.

This is not true for scheduled tasks, you can move the slider during the pause:

Slider[1]
SessionSubmit @ Pause[10]

While you can't move it during this pause:

Slider[1]
Dynamic @ Pause[10]

I guess the bottom line is that there is a difference between a preemptive evaluation in general and a preemptive evaluation coming from the preemptive link. And that difference needs more documentation space.

Further reading

Scheduled tasks and dynamic updating

$\endgroup$
  • $\begingroup$ you should reexamine that last example. Moving the slider thumb generated by Slider[1] will never go to the kernel (the FE doesn't need to update anything). Dynamic[Pause[10]] needs to go to the kernel, so therefore the FE blocks while it waiting for the result. $\endgroup$ – ihojnicki Jun 27 at 14:53
  • $\begingroup$ @ihojnicki Sorry for not being clear, I understand what happens. My point is that documentation says 'scheduled tasks are preemptive' && 'preemptive evaluations halt the system' while it should be 'preemptive link evaluations halt the system' because as an example with SessionSubmit shows, scheduled, preemptive pause does not block the slider as opposed to the dynamic preemptive pause. The question what to expect from $SynchronousUpdating remains too. $\endgroup$ – Kuba Jun 27 at 16:04
  • $\begingroup$ The docs are written with a Dynamic bias, but it really is a property of preemptive evaluations in the kernel. What if there were two ScheduledTasks? And I cannot comment on $SynchronousEvaluation. $\endgroup$ – ihojnicki Jun 27 at 21:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.