walkor / walkor/workerman

[question] Can we use Timer::add(0, $func, $vars, false) to run tasks async

Open
#937 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
11.6k
Forks
2.2k
Avg merge
11h 30m
Merged PRs (30d)
3

Description

Hi,
I have seen that in other frameworks, in reality is the base of async.

`Timer::add(0, $func, $vars, false);`
Theoretically this task will be included to schedule in the event loop.
If so, perhaps it will be better to add a `Timer::once(0, $func, $vars);`.

Example:
`Timer::add(0, $send_mail, $vars, false);`

What do you think @walkor ??

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.