polyphony 1.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -0
  3. data/CHANGELOG.md +16 -3
  4. data/README.md +1 -0
  5. data/TODO.md +5 -13
  6. data/docs/cheat-sheet.md +248 -0
  7. data/docs/design-principles.md +59 -3
  8. data/docs/faq.md +15 -32
  9. data/docs/fiber-scheduling.md +14 -12
  10. data/docs/overview.md +140 -35
  11. data/docs/readme.md +4 -3
  12. data/docs/tutorial.md +19 -149
  13. data/examples/core/debug.rb +12 -0
  14. data/examples/core/rpc_benchmark.rb +136 -0
  15. data/ext/polyphony/polyphony.c +2 -1
  16. data/lib/polyphony/extensions/fiber.rb +1 -0
  17. data/lib/polyphony/extensions/io.rb +171 -161
  18. data/lib/polyphony/extensions/pipe.rb +3 -5
  19. data/lib/polyphony/extensions/socket.rb +45 -54
  20. data/lib/polyphony/version.rb +1 -1
  21. data/polyphony.gemspec +3 -1
  22. data/test/test_socket.rb +1 -1
  23. metadata +33 -149
  24. data/vendor/liburing/man/IO_URING_CHECK_VERSION.3 +0 -1
  25. data/vendor/liburing/man/IO_URING_VERSION_MAJOR.3 +0 -1
  26. data/vendor/liburing/man/IO_URING_VERSION_MINOR.3 +0 -1
  27. data/vendor/liburing/man/io_uring.7 +0 -781
  28. data/vendor/liburing/man/io_uring_buf_ring_add.3 +0 -53
  29. data/vendor/liburing/man/io_uring_buf_ring_advance.3 +0 -31
  30. data/vendor/liburing/man/io_uring_buf_ring_cq_advance.3 +0 -41
  31. data/vendor/liburing/man/io_uring_buf_ring_init.3 +0 -30
  32. data/vendor/liburing/man/io_uring_buf_ring_mask.3 +0 -27
  33. data/vendor/liburing/man/io_uring_check_version.3 +0 -72
  34. data/vendor/liburing/man/io_uring_close_ring_fd.3 +0 -43
  35. data/vendor/liburing/man/io_uring_cq_advance.3 +0 -49
  36. data/vendor/liburing/man/io_uring_cq_has_overflow.3 +0 -25
  37. data/vendor/liburing/man/io_uring_cq_ready.3 +0 -26
  38. data/vendor/liburing/man/io_uring_cqe_get_data.3 +0 -53
  39. data/vendor/liburing/man/io_uring_cqe_get_data64.3 +0 -1
  40. data/vendor/liburing/man/io_uring_cqe_seen.3 +0 -42
  41. data/vendor/liburing/man/io_uring_enter.2 +0 -1700
  42. data/vendor/liburing/man/io_uring_enter2.2 +0 -1
  43. data/vendor/liburing/man/io_uring_free_probe.3 +0 -27
  44. data/vendor/liburing/man/io_uring_get_events.3 +0 -33
  45. data/vendor/liburing/man/io_uring_get_probe.3 +0 -30
  46. data/vendor/liburing/man/io_uring_get_sqe.3 +0 -57
  47. data/vendor/liburing/man/io_uring_major_version.3 +0 -1
  48. data/vendor/liburing/man/io_uring_minor_version.3 +0 -1
  49. data/vendor/liburing/man/io_uring_opcode_supported.3 +0 -30
  50. data/vendor/liburing/man/io_uring_peek_cqe.3 +0 -38
  51. data/vendor/liburing/man/io_uring_prep_accept.3 +0 -197
  52. data/vendor/liburing/man/io_uring_prep_accept_direct.3 +0 -1
  53. data/vendor/liburing/man/io_uring_prep_cancel.3 +0 -118
  54. data/vendor/liburing/man/io_uring_prep_cancel64.3 +0 -1
  55. data/vendor/liburing/man/io_uring_prep_close.3 +0 -59
  56. data/vendor/liburing/man/io_uring_prep_close_direct.3 +0 -1
  57. data/vendor/liburing/man/io_uring_prep_connect.3 +0 -66
  58. data/vendor/liburing/man/io_uring_prep_fadvise.3 +0 -59
  59. data/vendor/liburing/man/io_uring_prep_fallocate.3 +0 -59
  60. data/vendor/liburing/man/io_uring_prep_fgetxattr.3 +0 -1
  61. data/vendor/liburing/man/io_uring_prep_files_update.3 +0 -92
  62. data/vendor/liburing/man/io_uring_prep_fsetxattr.3 +0 -1
  63. data/vendor/liburing/man/io_uring_prep_fsync.3 +0 -70
  64. data/vendor/liburing/man/io_uring_prep_getxattr.3 +0 -61
  65. data/vendor/liburing/man/io_uring_prep_link.3 +0 -1
  66. data/vendor/liburing/man/io_uring_prep_link_timeout.3 +0 -94
  67. data/vendor/liburing/man/io_uring_prep_linkat.3 +0 -91
  68. data/vendor/liburing/man/io_uring_prep_madvise.3 +0 -56
  69. data/vendor/liburing/man/io_uring_prep_mkdir.3 +0 -1
  70. data/vendor/liburing/man/io_uring_prep_mkdirat.3 +0 -83
  71. data/vendor/liburing/man/io_uring_prep_msg_ring.3 +0 -92
  72. data/vendor/liburing/man/io_uring_prep_msg_ring_cqe_flags.3 +0 -1
  73. data/vendor/liburing/man/io_uring_prep_multishot_accept.3 +0 -1
  74. data/vendor/liburing/man/io_uring_prep_multishot_accept_direct.3 +0 -1
  75. data/vendor/liburing/man/io_uring_prep_nop.3 +0 -28
  76. data/vendor/liburing/man/io_uring_prep_openat.3 +0 -117
  77. data/vendor/liburing/man/io_uring_prep_openat2.3 +0 -117
  78. data/vendor/liburing/man/io_uring_prep_openat2_direct.3 +0 -1
  79. data/vendor/liburing/man/io_uring_prep_openat_direct.3 +0 -1
  80. data/vendor/liburing/man/io_uring_prep_poll_add.3 +0 -72
  81. data/vendor/liburing/man/io_uring_prep_poll_multishot.3 +0 -1
  82. data/vendor/liburing/man/io_uring_prep_poll_remove.3 +0 -55
  83. data/vendor/liburing/man/io_uring_prep_poll_update.3 +0 -89
  84. data/vendor/liburing/man/io_uring_prep_provide_buffers.3 +0 -140
  85. data/vendor/liburing/man/io_uring_prep_read.3 +0 -69
  86. data/vendor/liburing/man/io_uring_prep_read_fixed.3 +0 -72
  87. data/vendor/liburing/man/io_uring_prep_readv.3 +0 -85
  88. data/vendor/liburing/man/io_uring_prep_readv2.3 +0 -111
  89. data/vendor/liburing/man/io_uring_prep_recv.3 +0 -105
  90. data/vendor/liburing/man/io_uring_prep_recv_multishot.3 +0 -1
  91. data/vendor/liburing/man/io_uring_prep_recvmsg.3 +0 -124
  92. data/vendor/liburing/man/io_uring_prep_recvmsg_multishot.3 +0 -1
  93. data/vendor/liburing/man/io_uring_prep_remove_buffers.3 +0 -52
  94. data/vendor/liburing/man/io_uring_prep_rename.3 +0 -1
  95. data/vendor/liburing/man/io_uring_prep_renameat.3 +0 -96
  96. data/vendor/liburing/man/io_uring_prep_send.3 +0 -66
  97. data/vendor/liburing/man/io_uring_prep_send_set_addr.3 +0 -38
  98. data/vendor/liburing/man/io_uring_prep_send_zc.3 +0 -96
  99. data/vendor/liburing/man/io_uring_prep_send_zc_fixed.3 +0 -1
  100. data/vendor/liburing/man/io_uring_prep_sendmsg.3 +0 -89
  101. data/vendor/liburing/man/io_uring_prep_sendmsg_zc.3 +0 -1
  102. data/vendor/liburing/man/io_uring_prep_setxattr.3 +0 -64
  103. data/vendor/liburing/man/io_uring_prep_shutdown.3 +0 -53
  104. data/vendor/liburing/man/io_uring_prep_socket.3 +0 -118
  105. data/vendor/liburing/man/io_uring_prep_socket_direct.3 +0 -1
  106. data/vendor/liburing/man/io_uring_prep_socket_direct_alloc.3 +0 -1
  107. data/vendor/liburing/man/io_uring_prep_splice.3 +0 -120
  108. data/vendor/liburing/man/io_uring_prep_statx.3 +0 -74
  109. data/vendor/liburing/man/io_uring_prep_symlink.3 +0 -1
  110. data/vendor/liburing/man/io_uring_prep_symlinkat.3 +0 -85
  111. data/vendor/liburing/man/io_uring_prep_sync_file_range.3 +0 -59
  112. data/vendor/liburing/man/io_uring_prep_tee.3 +0 -74
  113. data/vendor/liburing/man/io_uring_prep_timeout.3 +0 -95
  114. data/vendor/liburing/man/io_uring_prep_timeout_remove.3 +0 -1
  115. data/vendor/liburing/man/io_uring_prep_timeout_update.3 +0 -98
  116. data/vendor/liburing/man/io_uring_prep_unlink.3 +0 -1
  117. data/vendor/liburing/man/io_uring_prep_unlinkat.3 +0 -82
  118. data/vendor/liburing/man/io_uring_prep_write.3 +0 -67
  119. data/vendor/liburing/man/io_uring_prep_write_fixed.3 +0 -72
  120. data/vendor/liburing/man/io_uring_prep_writev.3 +0 -85
  121. data/vendor/liburing/man/io_uring_prep_writev2.3 +0 -111
  122. data/vendor/liburing/man/io_uring_queue_exit.3 +0 -26
  123. data/vendor/liburing/man/io_uring_queue_init.3 +0 -89
  124. data/vendor/liburing/man/io_uring_queue_init_params.3 +0 -1
  125. data/vendor/liburing/man/io_uring_recvmsg_cmsg_firsthdr.3 +0 -1
  126. data/vendor/liburing/man/io_uring_recvmsg_cmsg_nexthdr.3 +0 -1
  127. data/vendor/liburing/man/io_uring_recvmsg_name.3 +0 -1
  128. data/vendor/liburing/man/io_uring_recvmsg_out.3 +0 -82
  129. data/vendor/liburing/man/io_uring_recvmsg_payload.3 +0 -1
  130. data/vendor/liburing/man/io_uring_recvmsg_payload_length.3 +0 -1
  131. data/vendor/liburing/man/io_uring_recvmsg_validate.3 +0 -1
  132. data/vendor/liburing/man/io_uring_register.2 +0 -834
  133. data/vendor/liburing/man/io_uring_register_buf_ring.3 +0 -140
  134. data/vendor/liburing/man/io_uring_register_buffers.3 +0 -104
  135. data/vendor/liburing/man/io_uring_register_buffers_sparse.3 +0 -1
  136. data/vendor/liburing/man/io_uring_register_buffers_tags.3 +0 -1
  137. data/vendor/liburing/man/io_uring_register_buffers_update_tag.3 +0 -1
  138. data/vendor/liburing/man/io_uring_register_eventfd.3 +0 -51
  139. data/vendor/liburing/man/io_uring_register_eventfd_async.3 +0 -1
  140. data/vendor/liburing/man/io_uring_register_file_alloc_range.3 +0 -52
  141. data/vendor/liburing/man/io_uring_register_files.3 +0 -112
  142. data/vendor/liburing/man/io_uring_register_files_sparse.3 +0 -1
  143. data/vendor/liburing/man/io_uring_register_files_tags.3 +0 -1
  144. data/vendor/liburing/man/io_uring_register_files_update.3 +0 -1
  145. data/vendor/liburing/man/io_uring_register_files_update_tag.3 +0 -1
  146. data/vendor/liburing/man/io_uring_register_iowq_aff.3 +0 -61
  147. data/vendor/liburing/man/io_uring_register_iowq_max_workers.3 +0 -71
  148. data/vendor/liburing/man/io_uring_register_ring_fd.3 +0 -49
  149. data/vendor/liburing/man/io_uring_register_sync_cancel.3 +0 -71
  150. data/vendor/liburing/man/io_uring_setup.2 +0 -669
  151. data/vendor/liburing/man/io_uring_sq_ready.3 +0 -31
  152. data/vendor/liburing/man/io_uring_sq_space_left.3 +0 -25
  153. data/vendor/liburing/man/io_uring_sqe_set_data.3 +0 -48
  154. data/vendor/liburing/man/io_uring_sqe_set_data64.3 +0 -1
  155. data/vendor/liburing/man/io_uring_sqe_set_flags.3 +0 -87
  156. data/vendor/liburing/man/io_uring_sqring_wait.3 +0 -34
  157. data/vendor/liburing/man/io_uring_submit.3 +0 -46
  158. data/vendor/liburing/man/io_uring_submit_and_get_events.3 +0 -31
  159. data/vendor/liburing/man/io_uring_submit_and_wait.3 +0 -38
  160. data/vendor/liburing/man/io_uring_submit_and_wait_timeout.3 +0 -56
  161. data/vendor/liburing/man/io_uring_unregister_buf_ring.3 +0 -30
  162. data/vendor/liburing/man/io_uring_unregister_buffers.3 +0 -27
  163. data/vendor/liburing/man/io_uring_unregister_eventfd.3 +0 -1
  164. data/vendor/liburing/man/io_uring_unregister_files.3 +0 -27
  165. data/vendor/liburing/man/io_uring_unregister_iowq_aff.3 +0 -1
  166. data/vendor/liburing/man/io_uring_unregister_ring_fd.3 +0 -32
  167. data/vendor/liburing/man/io_uring_wait_cqe.3 +0 -40
  168. data/vendor/liburing/man/io_uring_wait_cqe_nr.3 +0 -43
  169. data/vendor/liburing/man/io_uring_wait_cqe_timeout.3 +0 -53
  170. data/vendor/liburing/man/io_uring_wait_cqes.3 +0 -56
@@ -1,56 +0,0 @@
1
- .\" Copyright (C) 2021 Stefan Roesch <shr@fb.com>
2
- .\"
3
- .\" SPDX-License-Identifier: LGPL-2.0-or-later
4
- .\"
5
- .TH io_uring_wait_cqes 3 "November 15, 2021" "liburing-2.1" "liburing Manual"
6
- .SH NAME
7
- io_uring_wait_cqes \- wait for one or more io_uring completion events
8
- .SH SYNOPSIS
9
- .nf
10
- .B #include <liburing.h>
11
- .PP
12
- .BI "int io_uring_wait_cqes(struct io_uring *" ring ","
13
- .BI " struct io_uring_cqe **" cqe_ptr ","
14
- .BI " unsigned " wait_nr ","
15
- .BI " struct __kernel_timespec *" ts ","
16
- .BI " sigset_t *" sigmask ");
17
- .fi
18
- .SH DESCRIPTION
19
- .PP
20
- The
21
- .BR io_uring_wait_cqes (3)
22
- function returns
23
- .I wait_nr
24
- IO completions from the queue belonging to the
25
- .I ring
26
- param, waiting for them if necessary or until the timeout
27
- .I ts
28
- expires. The
29
- .I sigmask
30
- specifies the set of signals to block. The prevailing signal mask is restored
31
- before returning.
32
-
33
- The
34
- .I cqe_ptr
35
- param is filled in on success.
36
-
37
- If
38
- .I ts
39
- is specified and an older kernel without
40
- .B IORING_FEAT_EXT_ARG
41
- is used, the application does not need to call
42
- .BR io_uring_submit (3)
43
- before calling
44
- .BR io_uring_wait_cqes (3).
45
- For newer kernels with that feature flag set, there is no implied submit
46
- when waiting for a request.
47
-
48
- .SH RETURN VALUE
49
- On success
50
- .BR io_uring_wait_cqes (3)
51
- returns 0 and the cqe_ptr param is filled in. On failure it returns
52
- .BR -errno .
53
- .SH SEE ALSO
54
- .BR io_uring_submit (3),
55
- .BR io_uring_wait_cqe_timeout (3),
56
- .BR io_uring_wait_cqe (3)