io-event 1.6.7 → 1.7.0

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: 53bb3bfd2bffe7db8d43a4dd2d136a2ec9b62df30b78f90894b816a33a855765
4
- data.tar.gz: 151b806b36724b5f210e28a59949ca4c4550a79a15e29174b6c7bdf9e5e4ba7d
3
+ metadata.gz: 542a0e0f15dd7d59246ac8b03a3579ff9fe8e85618009277572b04a1d1fdbfc9
4
+ data.tar.gz: e440cf4f7f2a33a7e7c0b995f4b7829d4d66a44acb3f3d3ca00683b838062fcb
5
5
  SHA512:
6
- metadata.gz: ef219c25c4acc91a0fb56bfb3a36275b131d71e594682c0f6d383e0d66657ecd286b711bf90323e661d83be0961fa0baaf4368c0e3c2309b0e3376f9c006fefc
7
- data.tar.gz: 56112593370c044238ee9198ef1ee608e0be69507a37dd380c9a54d03948074b1ec89e692308f4b6e58096730398be1fd2a3efee4c9e055977e543058716aaec
6
+ metadata.gz: cd577bac5f3b70b70af3ca48f012179ec8d1b1774fc89cd46982fed601fe3a163a9ae9742b58ded385764c5233abc90cbf63f3b2563a114d232233085ba1c5ef
7
+ data.tar.gz: ff23dd077067823bd748d89482d39bb1b49cee26e87b6733561d2c3c09ffa3711015d0e8da514ac4851eccd81b84b0e7b66c2d5d7815ade30c551052e0dda536
checksums.yaml.gz.sig CHANGED
Binary file
data/ext/io/event/event.c CHANGED
@@ -21,20 +21,14 @@
21
21
  #include "event.h"
22
22
  #include "selector/selector.h"
23
23
 
24
- VALUE IO_Event = Qnil;
25
- VALUE IO_Event_Selector = Qnil;
26
-
27
24
  void Init_IO_Event(void)
28
25
  {
29
26
  #ifdef HAVE_RB_EXT_RACTOR_SAFE
30
27
  rb_ext_ractor_safe(true);
31
28
  #endif
32
29
 
33
- IO_Event = rb_define_module_under(rb_cIO, "Event");
34
- rb_gc_register_mark_object(IO_Event);
35
-
36
- IO_Event_Selector = rb_define_module_under(IO_Event, "Selector");
37
- rb_gc_register_mark_object(IO_Event_Selector);
30
+ VALUE IO_Event = rb_define_module_under(rb_cIO, "Event");
31
+ VALUE IO_Event_Selector = rb_define_module_under(IO_Event, "Selector");
38
32
 
39
33
  Init_IO_Event_Selector(IO_Event_Selector);
40
34
 
@@ -25,6 +25,13 @@
25
25
 
26
26
  #include "selector/selector.h"
27
27
 
28
+ #ifdef HAVE_RUBY_WIN32_H
29
+ #include <ruby/win32.h>
30
+ #if !defined(HAVE_PIPE) && !defined(pipe)
31
+ #define pipe(p) rb_w32_pipe(p)
32
+ #endif
33
+ #endif
34
+
28
35
  #ifdef HAVE_SYS_EVENTFD_H
29
36
  #include <sys/eventfd.h>
30
37
 
@@ -34,8 +34,6 @@ enum {
34
34
  DEBUG = 0,
35
35
  };
36
36
 
37
- static VALUE IO_Event_Selector_EPoll = Qnil;
38
-
39
37
  enum {EPOLL_MAX_EVENTS = 64};
40
38
 
41
39
  // This represents an actual fiber waiting for a specific event.
@@ -1037,8 +1035,7 @@ VALUE IO_Event_Selector_EPoll_wakeup(VALUE self) {
1037
1035
  }
1038
1036
 
1039
1037
  void Init_IO_Event_Selector_EPoll(VALUE IO_Event_Selector) {
1040
- IO_Event_Selector_EPoll = rb_define_class_under(IO_Event_Selector, "EPoll", rb_cObject);
1041
- rb_gc_register_mark_object(IO_Event_Selector_EPoll);
1038
+ VALUE IO_Event_Selector_EPoll = rb_define_class_under(IO_Event_Selector, "EPoll", rb_cObject);
1042
1039
 
1043
1040
  rb_define_alloc_func(IO_Event_Selector_EPoll, IO_Event_Selector_EPoll_allocate);
1044
1041
  rb_define_method(IO_Event_Selector_EPoll, "initialize", IO_Event_Selector_EPoll_initialize, 1);
@@ -43,8 +43,6 @@ enum {
43
43
  #define IO_EVENT_SELECTOR_KQUEUE_USE_INTERRUPT
44
44
  #endif
45
45
 
46
- static VALUE IO_Event_Selector_KQueue = Qnil;
47
-
48
46
  enum {KQUEUE_MAX_EVENTS = 64};
49
47
 
50
48
  // This represents an actual fiber waiting for a specific event.
@@ -1052,8 +1050,7 @@ VALUE IO_Event_Selector_KQueue_wakeup(VALUE self) {
1052
1050
  }
1053
1051
 
1054
1052
  void Init_IO_Event_Selector_KQueue(VALUE IO_Event_Selector) {
1055
- IO_Event_Selector_KQueue = rb_define_class_under(IO_Event_Selector, "KQueue", rb_cObject);
1056
- rb_gc_register_mark_object(IO_Event_Selector_KQueue);
1053
+ VALUE IO_Event_Selector_KQueue = rb_define_class_under(IO_Event_Selector, "KQueue", rb_cObject);
1057
1054
 
1058
1055
  rb_define_alloc_func(IO_Event_Selector_KQueue, IO_Event_Selector_KQueue_allocate);
1059
1056
  rb_define_method(IO_Event_Selector_KQueue, "initialize", IO_Event_Selector_KQueue_initialize, 1);
@@ -98,8 +98,6 @@ struct IO_Event_Selector {
98
98
  VALUE self;
99
99
  VALUE loop;
100
100
 
101
- struct IO_Event_Selector_Queue *free;
102
-
103
101
  // Append to waiting (front/head of queue).
104
102
  struct IO_Event_Selector_Queue *waiting;
105
103
  // Process from ready (back/tail of queue).
@@ -37,8 +37,6 @@ enum {
37
37
  DEBUG_COMPLETION = 0,
38
38
  };
39
39
 
40
- static VALUE IO_Event_Selector_URing = Qnil;
41
-
42
40
  enum {URING_ENTRIES = 64};
43
41
 
44
42
  #pragma mark - Data Type
@@ -1094,8 +1092,7 @@ VALUE IO_Event_Selector_URing_wakeup(VALUE self) {
1094
1092
  #pragma mark - Native Methods
1095
1093
 
1096
1094
  void Init_IO_Event_Selector_URing(VALUE IO_Event_Selector) {
1097
- IO_Event_Selector_URing = rb_define_class_under(IO_Event_Selector, "URing", rb_cObject);
1098
- rb_gc_register_mark_object(IO_Event_Selector_URing);
1095
+ VALUE IO_Event_Selector_URing = rb_define_class_under(IO_Event_Selector, "URing", rb_cObject);
1099
1096
 
1100
1097
  rb_define_alloc_func(IO_Event_Selector_URing, IO_Event_Selector_URing_allocate);
1101
1098
  rb_define_method(IO_Event_Selector_URing, "initialize", IO_Event_Selector_URing_initialize, 1);
@@ -5,6 +5,6 @@
5
5
 
6
6
  class IO
7
7
  module Event
8
- VERSION = "1.6.7"
8
+ VERSION = "1.7.0"
9
9
  end
10
10
  end
data/license.md CHANGED
@@ -9,6 +9,8 @@ Copyright, 2022, by Bruno Sutic.
9
9
  Copyright, 2023, by Math Ieu.
10
10
  Copyright, 2024, by Pavel Rosický.
11
11
  Copyright, 2024, by Anthony Ross.
12
+ Copyright, 2024, by Shizuo Fujita.
13
+ Copyright, 2024, by Jean Boussier.
12
14
 
13
15
  Permission is hereby granted, free of charge, to any person obtaining a copy
14
16
  of this software and associated documentation files (the "Software"), to deal
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: io-event
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.7
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -45,7 +45,7 @@ cert_chain:
45
45
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
46
46
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
47
47
  -----END CERTIFICATE-----
48
- date: 2024-10-03 00:00:00.000000000 Z
48
+ date: 2024-10-04 00:00:00.000000000 Z
49
49
  dependencies: []
50
50
  description:
51
51
  email:
metadata.gz.sig CHANGED
Binary file