Async.hx 519 B

123456789101112131415161718192021
  1. package eval.luv;
  2. /**
  3. Inter-loop communication.
  4. @see https://aantron.github.io/luv/luv/Luv/Async
  5. **/
  6. @:using(eval.luv.Handle)
  7. @:coreType abstract Async to Handle {
  8. /**
  9. Allocates and initializes an async 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, callback:(async:Async)->Void):Result<Async>;
  13. /**
  14. Triggers a call to the handle's callback by the handle's loop.
  15. **/
  16. public function send():Result<Result.NoData>;
  17. }