Idle.hx 557 B

1234567891011121314151617181920212223242526
  1. package eval.luv;
  2. /**
  3. Per-iteration callback.
  4. @see https://aantron.github.io/luv/luv/Luv/Idle
  5. **/
  6. @:using(eval.luv.Handle)
  7. @:coreType abstract Idle to Handle {
  8. /**
  9. Allocate and initialize an idle handle.
  10. The handle should be cleaned up with `eval.luv.Handle.close` when no longer needed.
  11. **/
  12. static public function init(loop:Loop):Result<Idle>;
  13. /**
  14. Starts the handle with the given callback.
  15. **/
  16. public function start(callback:()->Void):Result<Result.NoData>;
  17. /**
  18. Stops the handle.
  19. **/
  20. public function stop():Result<Result.NoData>;
  21. }