Skip to content

periodic timer with the interval of zero #236

Description

@amir-khoshbakht

Is this normal? periodic timer with zero value is executed only once . and never executes again !

    $timer = $loop->addPeriodicTimer(0,function ()use (&$timer){
       dump($timer); 
    });

the out put :

React\EventLoop\Timer\Timer^ {#2409
  -interval: 1.0E-6
  -callback: Closure()^ {#2407
    class: "App\Console\Commands\Example"
    this: App\Console\Commands\Example {#2277 …}
    use: {
      $timer: React\EventLoop\Timer\Timer^ {#2409}
    }
    file: "./app/Console/Commands/Example.php"
    line: "91 to 93"
  }
  -periodic: true
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions