bevyengine / bevyengine/bevy

Allow simultaneous parallel writes to Events

Open
#2,648 7 comments 14 reactions 0 assignees View on GitHub
A-ECS C-Feature C-Performance D-Complex S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## What problem does this solve or what need does it fill?

Users cannot send multiple events (via `EventWriter`) in parallel, either between systems or within a single system when using `par_for_each` iteration.

## What solution would you like?

Change the access model of `EventWriter` to allow for multiple simultaneous append-only writes.

## What alternative(s) have you considered?

Write to events in sequence, slowly.

## Additional context

`Commands` uses a similar parallelization strategy to allow multiple systems to add new commands simultaneously.

The logic for the final ordering of these events should match the ordering of the commands, which is determined by

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing Commands parallelization strategy and the EventWriter access model, then trace how par_for_each systems currently append events. Clarify the intended final ordering, since the issue text ends mid-sentence. Done should allow simultaneous append-only EventWriter writes while preserving the ordering semantics used for commands.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.