You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then delayed or recurring messages are never delivered to it (no matter what priority they have), because Timed wrapper only processes them in deadline_exceeded(), which is never called (because the queue in never empty in actors event loop handling).
The text was updated successfully, but these errors were encountered:
* Add test showcasing delayed messages not delivered to busy actors
This test currently fails with
```
---- timed::tests::it_works stdout ----
thread 'timed::tests::it_works' panicked at 'assertion failed: `(left == right)`
left: `[1, 3, 3]`,
right: `[1, 2, 3, 2, 3]`', src/timed.rs:318:9
```
I.e. messages of type 2 (delayed) are never delivered.
* Process delayed/recurring messages also for busy actors
This fixes the recurring_messages_for_busy_actors test, and should fix#72.
* Shuffle queue handling order, add/improve code comments
The order does not matter much (it for example does not change the order or received messages in the test), but I've found this way more logical.
* Fix typo
* Better commend wording
…when due
Also rename `fire_at` to `enqueue_at` to be explicit about the fact.
This is a trade-off that prevents 2 sorts of bad behavior:
- actors with send-sending messages never handling any delayed/recurring messages (#72)
- actors with recurring messages that are slower to handle than their interval eventually not processing any outside messages (#79)
See the tweaked tests for the change of behavior.
When a
Timed<>
actor does something likeThen delayed or recurring messages are never delivered to it (no matter what priority they have), because
Timed
wrapper only processes them indeadline_exceeded()
, which is never called (because the queue in never empty in actors event loop handling).The text was updated successfully, but these errors were encountered: