Skip to content

internal/ui: reduce lock usages especially for initial-value members #3403

@hajimehoshi

Description

@hajimehoshi

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • PlayStation 5
  • Xbox
  • Web Browsers

What feature would you like to be added?

This is related to #3402. Now Ebitengine uses a mutext at internal/ui package, but we should be able to reduce them. A mutex is useful but quite risky as this can cause deadlocks if the usage is wrong.

Let's check the current usage and reduce them if possible. Especially, a member variables for initial values should not have to use a mutex. Instead, we can use atomic values.

Why is this needed?

To avoid potential deadlocks.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions