Skip to content

Mimic Octane::concurrently behavior #56

@cayolblake

Description

@cayolblake

Hello,

In Laravel Octane when using Swoole its possible to do something like the following.

	[ $recs1, $recs2 ] = Octane::concurrently( [
		fn() => $this->get_recs_a( $ids ),
		fn() => $this->get_recs_b( $ids )
	] );

What this will do is execute both functions get_recs_a and get_recs_b concurrently yet not returning unless both got executed and set their return values to $recs1 and $recs2.

How to achieve similar behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions