EventReciever method, that would return all the latest event asynchronously. (ReceiveAllAsync() wanted)
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
Is your feature request related to a problem? Please describe.
In Stride.Engine.Events, there is are sync methods TryReceive and TryReceiveAll. However for async there is only ReceiveAsync(). The problem is that, if there are several events of that type, regular ReceiveAsync() would only return one, while others would get lost. It requires additional code to be created. Something like:
do {
var data= await EventReceiver.ReceiveAsync();
}
while (EventReceiver.Count > 0);
Describe the solution you'd like
ReceiveAllAsync() - the method that will return a collection of all items. That would be clean, predictable and nice.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating Stride.Engine.Events and the EventReceiver entry points mentioned in the issue: ReceiveAsync, TryReceive, and TryReceiveAll. Compare their behavior and determine how ReceiveAllAsync should return all pending events without loss; done means the new method has clear collection semantics and covers the asynchronous case described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100