Repository navigation
docs: correct Event class description in event-based-asynchronous README - #3624
1wu-davy-2 wants to merge 1 commit into
Conversation
PR SummaryUpdated the README to reflect the actual Event design. It now describes Changes
autogenerated by presubmit.ai |
There was a problem hiding this comment.
✅ LGTM!
Review Summary
Commits Considered (1)
- 8de76a0: docs: correct Event class description in event-based-asynchronous README
Files Processed (1)
- event-based-asynchronous/README.md (4 hunks)
Actionable Comments (0)
Skipped Comments (4)
-
event-based-asynchronous/README.md [44-49]
readability: "Clarify event abstraction and synchronization model"
-
event-based-asynchronous/README.md [75-78]
readability: "Explain createAsync wrapper and its relation to AsyncEvent"
-
event-based-asynchronous/README.md [80-82]
readability: "Terminology consistency (runtime vs. eventTime)"
-
event-based-asynchronous/README.md [151-152]
readability: "Clarify lifecycle of synchronous event tracking"
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3624 +/- ##
============================================
- Coverage 84.06% 84.01% -0.06%
+ Complexity 4353 4349 -4
============================================
Files 1133 1133
Lines 15400 15400
Branches 739 739
============================================
- Hits 12946 12938 -8
- Misses 2158 2164 +6
- Partials 296 298 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
The README claimed that
Eventis an abstract class with two concrete subclasses,AsyncEventandSyncEvent. Neither statement matches the code:Eventis aninterfacedeclaringstart(),stop()andstatus().SyncEventclass. The only implementation isAsyncEvent, which carries asynchronousflag.EventManager.createEvent(Duration, boolean isSynchronous)buildsnew AsyncEvent(id, time, isSynchronous)for both kinds, so synchronous and asynchronous events are the same class.AsyncEvent.start()always spawns its own thread, so a synchronous event does not "run on the main thread and block it". The real distinction is thatEventManagerpermits only one synchronous event at a time, tracked by thecurrentlyRunningSyncEventfield.The
createAsyncandcreatesnippets were also replaced with the actual implementations.Checklist
event-based-asynchronous/README.md)Event.java,AsyncEvent.javaandEventManager.javaSyncEventas a class, or toEventas an abstract classAssisted by AI tools for initial analysis; all changes manually verified and tested.