()
| 601 | } |
| 602 | |
| 603 | flush() { |
| 604 | try { |
| 605 | if (DEV) { |
| 606 | source_stacks.clear(); |
| 607 | } |
| 608 | |
| 609 | is_processing = true; |
| 610 | current_batch = this; |
| 611 | |
| 612 | this.#process(); |
| 613 | } finally { |
| 614 | flush_count = 0; |
| 615 | last_scheduled_effect = null; |
| 616 | collected_effects = null; |
| 617 | legacy_updates = null; |
| 618 | is_processing = false; |
| 619 | |
| 620 | current_batch = null; |
| 621 | batch_values = null; |
| 622 | |
| 623 | old_values.clear(); |
| 624 | |
| 625 | if (DEV) { |
| 626 | for (const source of source_stacks) { |
| 627 | source.updated = null; |
| 628 | } |
| 629 | } |
| 630 | } |
| 631 | } |
| 632 | |
| 633 | discard() { |
| 634 | for (const fn of this.#discard_callbacks) fn(this); |