(node: ReactiveNode)
| 342 | * Propagate a dirty notification to live consumers of this producer. |
| 343 | */ |
| 344 | export function producerNotifyConsumers(node: ReactiveNode): void { |
| 345 | if (node.consumers === undefined) { |
| 346 | return; |
| 347 | } |
| 348 | |
| 349 | // Prevent signal reads when we're updating the graph |
| 350 | const prev = inNotificationPhase[0]; |
| 351 | inNotificationPhase[0] = true; |
| 352 | try { |
| 353 | for ( |
| 354 | let link: ReactiveLink | undefined = node.consumers; |
| 355 | link !== undefined; |
| 356 | link = link.nextConsumer |
| 357 | ) { |
| 358 | const consumer = link.consumer; |
| 359 | if (!consumer.dirty) { |
| 360 | consumerMarkDirty(consumer); |
| 361 | } |
| 362 | } |
| 363 | } finally { |
| 364 | inNotificationPhase[0] = prev; |
| 365 | } |
| 366 | } |
| 367 | |
| 368 | /** |
| 369 | * Whether this `ReactiveNode` in its producer capacity is currently allowed to initiate updates, |
no test coverage detected