Changes between Initial Version and Version 1 of Ticket #1638, comment 3


Ignore:
Timestamp:
03/03/20 11:20:34 (4 years ago)
Author:
Sebastien Marie
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1638, comment 3

    initial v1  
    55with the current code of the scheduler, after an interruption is proceeded, the thread-state-buffer is overrided (without saving) by previous state, resulting changes lost.
    66
    7 the code exposes the problem because when {{{{(param 42)}}} is called the vector is resized. so it is the same vector which is used (even if value inside the vector changed). When {{{{(param 42)}}} is not called, when the interruption-code call {{{{(param 4)}}} it trigger a resize, and so {{{##sys#current-parameter-vector}}} points to a new vector with new values, and once the primodial thread is rescheduled, it first calls {{{##sys#restore-thread-state-buffer}}} and {{{##sys#current-parameter-vector}}} is overrided by the old vector (with old values).
     7the code exposes the problem because when {{{(param 42)}}} is called the vector is resized before the interruption-code. so it is the same vector which is used (even if value inside the vector changed). When {{{(param 42)}}} is not called, when the interruption-code call {{{(param 4)}}} it trigger a resize, and so {{{##sys#current-parameter-vector}}} points to a new vector with new values, and once the primodial thread is rescheduled, it first calls {{{##sys#restore-thread-state-buffer}}} and {{{##sys#current-parameter-vector}}} is overrided by the old vector (with old values).
    88
    99With a modified scheduler.scm, I have the following trace: