Expand documentation, examples, and performance tests#3
Expand documentation, examples, and performance tests#3Waiting-Chai wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Timeout frame = env.timeout(4, "frame"); | ||
| Timeout electronics = env.timeout(2, "electronics"); | ||
| AllOf finished = env.allOf(frame, electronics); | ||
| yield finished; |
There was a problem hiding this comment.
Replace generator-style yield with ProcessContext awaits
The example process is written with Python-like yield finished;, but Process.ProcessFunction expects you to block on events via the provided ProcessContext (e.g., ctx.await(...)). Using yield here is neither valid Java syntax nor a call to await an event, so the example will not compile or run; the same issue applies to the later yield env.timeout(10); in this class.
Useful? React with 👍 / 👎.
| PriorityRequest request = cashier.request(priority); | ||
| yield request; | ||
|
|
||
| System.out.printf("t=%.0f -> %s got service\n", env.now(), name); | ||
| yield env.timeout(serviceTime); |
There was a problem hiding this comment.
Example process uses invalid yield instead of ctx.await
This example uses bare yield statements (yield request;, yield env.timeout(serviceTime);) inside a ProcessFunction, but the process API requires awaiting events through the provided context (e.g., ctx.await(...)). As written the code is invalid Java and won’t compile/run, undermining the “runnable example” intent.
Useful? React with 👍 / 👎.
Summary
Testing
Codex Task