rage-iodine 3.0.5 → 3.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46e68c191deee2280af13f14e89cd2cc724b8829f25af0dc975d9190fdb46a9a
4
- data.tar.gz: 77f083659e27efc029c94dabd45b06049644757bf843ac41d19ac7f09214f581
3
+ metadata.gz: af7a9d60835bf9e95bf426fd9adf7fd2375af632dd39bb35d57a83f2441d8318
4
+ data.tar.gz: d13e31e81ca1a8764252d8dbf1fca4aed45bc291e661e5f5c322bdb8a0551089
5
5
  SHA512:
6
- metadata.gz: b3adbeeaa4a1c7c83ed5e5ec6ac6bbd1b353ed8144cd05186ed3d22707d1a7df182336451ee767d5f30db7075dbde1611e0a94bb50e8bdd7ee262b85d536eefc
7
- data.tar.gz: 42228e64d9c7dfdd3736847ce17fc9ee781905b117f9955be62977de1afc1ed7dae4b23a29396f4eb3f8c3c25c7e7090e995dab111887d51c93646b3a19bcff3
6
+ metadata.gz: 65287e0a103dacf4b4b52dbb493e2cd42ffe6b23b47e5a1b022c9b1b21601128517663ed9c7de61f4350587865c27d4af7a25d27ee170164c06040d0026cd8b7
7
+ data.tar.gz: 75f0102920b0b8f090998f7bafe210ee0918b583ce35595e1a17e1b3c43577bbce9d531e0fd829dfad193c26c3a032db03c1b5d1bd298213ee6f244def4637a2
data/CHANGELOG.md CHANGED
@@ -6,6 +6,15 @@ Please notice that this change log contains changes for upcoming releases as wel
6
6
 
7
7
  ## Changes:
8
8
 
9
+ #### Change log v.3.0.7 (2024-04-10)
10
+
11
+ **Fix**: Fix excessive CPU usage when using `run_every` on kqueue systems.
12
+
13
+ #### Change log v.3.0.6 (2024-03-14)
14
+
15
+ **Fix**: Fix `call_with_block` function's signature.
16
+ **Fix**: Fix "enumeration values ... not handled in switch" warning.
17
+
9
18
  #### Change log v.3.0.5 (2024-03-13)
10
19
 
11
20
  **Fix**: Fix the "incompatible pointer" compilation warnings.
data/ext/iodine/fio.c CHANGED
@@ -2191,7 +2191,7 @@ static size_t fio_poll(void) {
2191
2191
 
2192
2192
  const struct timespec timeout = {
2193
2193
  .tv_sec = (timeout_millisec / 1000),
2194
- .tv_nsec = ((timeout_millisec & (~1023UL)) * 1000000)};
2194
+ .tv_nsec = ((timeout_millisec % 1000) * 1000000)};
2195
2195
  /* wait for events and handle them */
2196
2196
  int active_count =
2197
2197
  kevent(evio_fd, NULL, 0, events, FIO_POLL_MAX_EVENTS, &timeout);
@@ -31,7 +31,7 @@ typedef struct {
31
31
  ID method;
32
32
  int exception;
33
33
  VALUE (*protected_task)(VALUE tsk_);
34
- VALUE (*each_func)(VALUE block_arg, VALUE data, int argc, VALUE *argv);
34
+ VALUE (*each_func)(VALUE block_arg, VALUE data, int argc, const VALUE *argv, VALUE blockarg);
35
35
  VALUE each_udata;
36
36
  } iodine_rb_task_s;
37
37
 
@@ -160,7 +160,7 @@ static VALUE iodine_call2(VALUE obj, ID method, int argc, VALUE *argv) {
160
160
  static VALUE iodine_call_block(VALUE obj, ID method, int argc, VALUE *argv,
161
161
  VALUE udata,
162
162
  VALUE(each_func)(VALUE block_arg, VALUE udata,
163
- int argc, VALUE *argv)) {
163
+ int argc, const VALUE *argv, VALUE blockarg)) {
164
164
  iodine_rb_task_s task = {
165
165
  .obj = obj,
166
166
  .argc = argc,
@@ -17,7 +17,7 @@ extern struct IodineCaller_s {
17
17
  /** Calls a Ruby method on a given object, protecting against exceptions. */
18
18
  VALUE(*call_with_block)
19
19
  (VALUE obj, ID method, int argc, VALUE *argv, VALUE udata,
20
- VALUE (*block_func)(VALUE block_argv1, VALUE udata, int argc, VALUE *argv));
20
+ VALUE (*block_func)(VALUE block_argv1, VALUE udata, int argc, const VALUE *argv, VALUE blockarg));
21
21
  /** Returns the GVL state flag. */
22
22
  uint8_t (*in_GVL)(void);
23
23
  /** Forces the GVL state flag. */
@@ -544,7 +544,7 @@ array_style_multi_value:
544
544
 
545
545
  // writes the body to the response object
546
546
  static VALUE for_each_body_string(VALUE str, VALUE body_, int argc,
547
- VALUE *argv) {
547
+ const VALUE *argv, VALUE blockarg) {
548
548
  // fprintf(stderr, "For_each - body\n");
549
549
  // write body
550
550
  if (TYPE(str) != T_STRING) {
@@ -557,6 +557,7 @@ static VALUE for_each_body_string(VALUE str, VALUE body_, int argc,
557
557
  return Qtrue;
558
558
  (void)argc;
559
559
  (void)argv;
560
+ (void)blockarg;
560
561
  }
561
562
 
562
563
  static inline int ruby2c_response_send(iodine_http_request_handle_s *handle,
@@ -813,6 +814,11 @@ iodine_perform_handle_action(iodine_http_request_handle_s handle) {
813
814
  http_send_error(handle.h, handle.h->status);
814
815
  fiobj_free(handle.body);
815
816
  break;
817
+ case IODINE_HTTP_WAIT:
818
+ case IODINE_HTTP_DEFERRED:
819
+ /* these are handled before the `iodine_perform_handle_action` call */
820
+ FIO_LOG_WARNING("Unexpected handle type in perform_handle_action: %d", handle.type);
821
+ break;
816
822
  }
817
823
  }
818
824
 
@@ -1,3 +1,3 @@
1
1
  module Iodine
2
- VERSION = '3.0.5'.freeze
2
+ VERSION = '3.0.7'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rage-iodine
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5
4
+ version: 3.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boaz Segev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-13 00:00:00.000000000 Z
11
+ date: 2024-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake