| 1 | package SPVM::UV::Handle::Async; | ||
| 2 | |||
| 3 | |||
| 4 | |||
| 5 | 1; | ||
| 6 | |||
| 7 | =encoding utf8 | ||
| 8 | |||
| 9 | =head1 Name | ||
| 10 | |||
| 11 | SPVM::UV::Handle::Async - Async Handle for libuv | ||
| 12 | |||
| 13 | =head1 Description | ||
| 14 | |||
| 15 | C<UV::Handle::Async> in L<SPVM> represents the async handle for L<libuv|https://libuv.org/>, corresponding to the C<uv_async_t> structure. | ||
| 16 | |||
| 17 | =head1 Super Class | ||
| 18 | |||
| 19 | L<UV::Handle|SPVM::UV::Handle> | ||
| 20 | |||
| 21 | =head1 Usage | ||
| 22 | |||
| 23 | use UV::Handle::Async; | ||
| 24 | |||
| 25 | my $async = UV::Handle::Async->new; | ||
| 26 | |||
| 27 | =head1 Fields | ||
| 28 | |||
| 29 | =head2 async_cb | ||
| 30 | |||
| 31 | C<has async_cb : rw L<UV::Callback::Async|SPVM::UV::Callback::Async>;> | ||
| 32 | |||
| 33 | The callback called when the async handle has been awakened. | ||
| 34 | |||
| 35 | =head1 Class Methods | ||
| 36 | |||
| 37 | =head2 new | ||
| 38 | |||
| 39 | C<static method new : L<UV::Handle::Async|SPVM::UV::Handle::Async> ();> | ||
| 40 | |||
| 41 | Creates a new L<UV::Handle::Async|SPVM::UV::Handle::Async> object, and returns it. | ||
| 42 | |||
| 43 | =head1 Instance Methods | ||
| 44 | |||
| 45 | =head2 send | ||
| 46 | |||
| 47 | C<method send : void ();> | ||
| 48 | |||
| 49 | Awakens the async handle. | ||
| 50 | |||
| 51 | This method calls the L<uv_async_send|https://docs.libuv.org/en/v1.x/async.html#c.uv_async_send> function. | ||
| 52 | |||
| 53 | Exceptions: | ||
| 54 | |||
| 55 | If uv_async_send fails, an exception is thrown. | ||
| 56 | |||
| 57 | =head1 Copyright & License | ||
| 58 | |||
| 59 | Copyright (c) 2026 Yuki Kimoto | ||
| 60 | |||
| 61 | MIT License |