Changes between Initial Version and Version 1 of Ticket #1638, comment 3
- Timestamp:
- 03/03/20 11:20:34 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #1638, comment 3
initial v1 5 5 with 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. 6 6 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).7 the 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). 8 8 9 9 With a modified scheduler.scm, I have the following trace: