io-event 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/ext/io/event/selector/epoll.c +2 -2
- data/ext/io/event/selector/list.h +19 -1
- data/ext/io/event/selector/selector.c +1 -2
- data/ext/io/event/selector/uring.c +1 -0
- data/lib/io/event/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7b49a9181d8917dd2dba7620f964ad0dced4d33ab9a5d725f5493debd927ea6
|
4
|
+
data.tar.gz: ce62d1d7c3488ccb39620a66b3c25a12537a586fc0e6b9b9f3263ad662abbcb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c0d875c4ec99d9670d16980ea6b6f92073547b6da089cccab1dc96af6b40f0034a3f3ce6151123acddedb48b808b27782bce638ec93884823a07951fb381f57
|
7
|
+
data.tar.gz: fc818ad30b6087149020f7b9fc718c9219b54d19dbfef69c468605c4154d58e0a75d802d1b646829d2a48c8a24d4b4bcdae15a5cea21aa2826d051eb1975f585
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -241,7 +241,7 @@ int IO_Event_Selector_EPoll_Descriptor_update(struct IO_Event_Selector_EPoll *se
|
|
241
241
|
} else {
|
242
242
|
// The IO has changed, we need to reset the state:
|
243
243
|
epoll_descriptor->registered_events = 0;
|
244
|
-
epoll_descriptor->io
|
244
|
+
RB_OBJ_WRITE(selector->backend.self, &epoll_descriptor->io, io);
|
245
245
|
}
|
246
246
|
|
247
247
|
if (epoll_descriptor->waiting_events == 0) {
|
@@ -251,7 +251,7 @@ int IO_Event_Selector_EPoll_Descriptor_update(struct IO_Event_Selector_EPoll *se
|
|
251
251
|
epoll_descriptor->registered_events = 0;
|
252
252
|
}
|
253
253
|
|
254
|
-
epoll_descriptor->io
|
254
|
+
RB_OBJ_WRITE(selector->backend.self, &epoll_descriptor->io, 0);
|
255
255
|
|
256
256
|
return 0;
|
257
257
|
}
|
@@ -38,6 +38,7 @@ inline static void IO_Event_List_append(struct IO_Event_List *list, struct IO_Ev
|
|
38
38
|
head->tail = node;
|
39
39
|
}
|
40
40
|
|
41
|
+
// Prepend an item to the beginning of the list.
|
41
42
|
inline static void IO_Event_List_prepend(struct IO_Event_List *list, struct IO_Event_List *node)
|
42
43
|
{
|
43
44
|
assert(node->head == NULL);
|
@@ -64,6 +65,7 @@ inline static void IO_Event_List_pop(struct IO_Event_List *node)
|
|
64
65
|
node->head = node->tail = NULL;
|
65
66
|
}
|
66
67
|
|
68
|
+
// Remove an item from the list, if it is in a list.
|
67
69
|
inline static void IO_Event_List_free(struct IO_Event_List *node)
|
68
70
|
{
|
69
71
|
if (node->head && node->tail) {
|
@@ -71,11 +73,27 @@ inline static void IO_Event_List_free(struct IO_Event_List *node)
|
|
71
73
|
}
|
72
74
|
}
|
73
75
|
|
74
|
-
|
76
|
+
// Calculate the memory size of the list nodes.
|
77
|
+
inline static size_t IO_Event_List_memory_size(const struct IO_Event_List *list)
|
78
|
+
{
|
79
|
+
size_t memsize = 0;
|
80
|
+
|
81
|
+
const struct IO_Event_List *node = list->tail;
|
82
|
+
while (node != list) {
|
83
|
+
memsize += sizeof(struct IO_Event_List);
|
84
|
+
node = node->tail;
|
85
|
+
}
|
86
|
+
|
87
|
+
return memsize;
|
88
|
+
}
|
89
|
+
|
90
|
+
// Return true if the list is empty.
|
91
|
+
inline static int IO_Event_List_empty(const struct IO_Event_List *list)
|
75
92
|
{
|
76
93
|
return list->head == list->tail;
|
77
94
|
}
|
78
95
|
|
96
|
+
// Enumerate all items in the list, assuming the list will not be modified during iteration.
|
79
97
|
inline static void IO_Event_List_immutable_each(struct IO_Event_List *list, void (*callback)(struct IO_Event_List *node))
|
80
98
|
{
|
81
99
|
struct IO_Event_List *node = list->tail;
|
@@ -287,8 +287,7 @@ void IO_Event_Selector_queue_push(struct IO_Event_Selector *backend, VALUE fiber
|
|
287
287
|
waiting->tail = NULL;
|
288
288
|
waiting->flags = IO_EVENT_SELECTOR_QUEUE_INTERNAL;
|
289
289
|
|
290
|
-
waiting->fiber
|
291
|
-
RB_OBJ_WRITTEN(backend->self, Qundef, fiber);
|
290
|
+
RB_OBJ_WRITE(backend->self, &waiting->fiber, fiber);
|
292
291
|
|
293
292
|
queue_push(backend, waiting);
|
294
293
|
}
|
data/lib/io/event/version.rb
CHANGED
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.7.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
|
-
rubygems_version: 3.
|
107
|
+
rubygems_version: 3.5.11
|
108
108
|
signing_key:
|
109
109
|
specification_version: 4
|
110
110
|
summary: An event loop.
|
metadata.gz.sig
CHANGED
Binary file
|