feat: Add an option to wait for events in tox_iterate.#2979
Draft
iphydf wants to merge 1 commit into
Draft
Conversation
iphydf
force-pushed
the
tox-event
branch
20 times, most recently
from
January 16, 2026 17:46
b100f28 to
2a028db
Compare
iphydf
marked this pull request as ready for review
January 16, 2026 18:32
iphydf
force-pushed
the
tox-event
branch
2 times, most recently
from
January 17, 2026 00:58
99c5b7e to
64fb992
Compare
iphydf
marked this pull request as draft
January 17, 2026 01:16
iphydf
force-pushed
the
tox-event
branch
3 times, most recently
from
January 17, 2026 02:57
9ba0659 to
ee78824
Compare
iphydf
force-pushed
the
tox-event
branch
16 times, most recently
from
January 19, 2026 19:52
408e219 to
87c41aa
Compare
iphydf
marked this pull request as ready for review
January 19, 2026 19:54
| .del_callback | ||
| = [](void *self, Socket sock) { return static_cast<FakeEvent *>(self)->del(sock); }, | ||
| .run_callback = | ||
| [](void *self, Ev_Result results[], uint32_t max_results, int32_t timeout_ms) { |
Check notice
Code scanning / CodeQL
No raw arrays in interfaces Note test
| return monitored_.erase(fd) > 0; | ||
| } | ||
|
|
||
| int32_t FakeEvent::run(Ev_Result results[], uint32_t max_results, int32_t timeout_ms) |
Check notice
Code scanning / CodeQL
No raw arrays in interfaces Note test
Comment on lines
+1273
to
+1276
| if (n > 0) { | ||
| /* Events occurred, but do_messenger will poll all sockets anyway. */ | ||
| // TODO(iphydf): Optimize do_messenger to only process ready sockets. | ||
| } |
Check notice
Code scanning / CodeQL
Futile conditional Note
iphydf
force-pushed
the
tox-event
branch
2 times, most recently
from
January 24, 2026 21:30
e93f1cc to
f45bd0b
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2979 +/- ##
==========================================
+ Coverage 68.84% 69.89% +1.04%
==========================================
Files 184 188 +4
Lines 33818 34193 +375
==========================================
+ Hits 23283 23900 +617
+ Misses 10535 10293 -242 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Introduce `Ev` abstraction for event loops. - Implement `os_event` using epoll (Linux) and AFD/poll (Windows/other). - Update `toxcore` networking to use `Ev`. - Add `experimental_iterate_timeout_ms` option to blocking wait. - Add `FakeEvent` for testing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change is