Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel state #291

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Parallel state #291

wants to merge 3 commits into from

Conversation

agrare
Copy link
Member

@agrare agrare commented Oct 21, 2024

This follows a similar pattern as Map, there are child workflows that are run by a single thread so multiple Task states can be running at once but no race condition on the Context hash as all updates are made by a single thread

$ exe/floe examples/parallel.asl 
I, [2024-10-21T13:17:32.089627 #170560]  INFO -- : Checking 1 workflows...
I, [2024-10-21T13:17:32.089772 #170560]  INFO -- : Running state: [Parallel:FunWithMath] with input [{}]...
I, [2024-10-21T13:17:32.090825 #170560]  INFO -- : Running state: [Task:Add] with input [{}]...
D, [2024-10-21T13:17:32.091039 #170560] DEBUG -- : Running docker run --detach --label execution_id\=280dc532-a244-4e44-b596-84fd0c7daeb2 --name floe-sleep-63013e56 docker.io/agrare/sleep:latest
I, [2024-10-21T13:17:32.422312 #170560]  INFO -- : Running state: [Task:Subtract] with input [{}]...
D, [2024-10-21T13:17:32.422417 #170560] DEBUG -- : Running docker run --detach --label execution_id\=280dc532-a244-4e44-b596-84fd0c7daeb2 --name floe-sleep-ea7bb500 docker.io/agrare/sleep:latest
I, [2024-10-21T13:17:42.661634 #170560]  INFO -- : Running state: [Task:Add] with input [{}]...Complete workflow - output: [{}]
I, [2024-10-21T13:17:43.257551 #170560]  INFO -- : Running state: [Task:Subtract] with input [{}]...Complete workflow - output: [{}]
I, [2024-10-21T13:17:43.307810 #170560]  INFO -- : Running state: [Parallel:FunWithMath] with input [{}]...Complete workflow - output: [[{},{}]]
I, [2024-10-21T13:17:43.307864 #170560]  INFO -- : Checking 1 workflows...Complete - 1 ready
[{},{}]

Fixes #287

@agrare agrare requested a review from Fryguy as a code owner October 21, 2024 17:18
@agrare agrare force-pushed the parallel_state branch 6 times, most recently from 6ff1e59 to 5c48568 Compare October 25, 2024 16:40
@agrare agrare requested a review from kbrock October 25, 2024 17:22
@agrare agrare changed the title [WIP] Parallel state Parallel state Oct 25, 2024
@agrare agrare added the enhancement New feature or request label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Parallel
1 participant