Skip to content

ValueError: generator already executing when multithreading #221

@lilydjwg

Description

@lilydjwg

I run multiple threads and I get the following traceback:

      File "...", line ..., in ...:
        msg = l10n.format_value('...', {...})
      File "/usr/lib/python3.14/site-packages/fluent/runtime/fallback.py", line 41, in format_value
        for bundle in self._bundles():
      File "/usr/lib/python3.14/site-packages/fluent/runtime/fallback.py", line 61, in _bundles
        self._bundle_cache.append(next(self._bundle_it))
    ValueError: generator already executing

It seems that the iterator needs to be protected by a lock.

The version I use might be a bit old (see #219), but I checked the latest code on GitHub and the iterator is still unprotected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions