Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Run different worker types in separate threads #803

Open
@dandavison

Description

@dandavison

Currently, when workflow and activity workers are run in the same process, they share the the same thread (same event loop):

if self._activity_worker:
tasks.append(asyncio.create_task(self._activity_worker.run()))
if self._workflow_worker:
tasks.append(asyncio.create_task(self._workflow_worker.run()))

Running these (and Nexus workers when they arrive) in different threads would prevent an async activity that incorrectly does blocking I/O from blocking workflow progress. In addition to limiting blast radius it should make it easier to understand the failure modes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions