agoo 2.15.11 → 2.15.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +1 -4
- data/ext/agoo/agoo.c +2 -2
- data/ext/agoo/debug.c +2 -2
- data/ext/agoo/domain.c +2 -2
- data/ext/agoo/dtime.c +1 -1
- data/ext/agoo/error_stream.c +1 -1
- data/ext/agoo/gqleval.c +1 -1
- data/ext/agoo/graphql.c +1 -1
- data/ext/agoo/http.c +2 -2
- data/ext/agoo/log.c +9 -9
- data/ext/agoo/page.c +1 -1
- data/ext/agoo/rack_logger.c +1 -1
- data/ext/agoo/rresponse.c +1 -1
- data/ext/agoo/rserver.c +7 -1
- data/lib/agoo/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37b6b991cfea7d2296391628e8dc47517dd77d430439bcfc23f172fd07c94016
|
4
|
+
data.tar.gz: d70eb6f9acd35ab380befa04a449687e151482bb7f37e2b8cdd2db647f8f7e92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed6f0947338d3498acde38b4507c63267c6f3ea5ac0c71a4c77e996c017895cf453175e1b11f79b6b5d47d742cb94d4a53095db986ae9dca8799b8ff5142003e
|
7
|
+
data.tar.gz: 471a82403e18363d1c71fb46e5d296ef203afa785d58ac6bf771bb135dd6a99275b3508e1133d935535c46447108d3d7f9c9a181c2465f62bb43e8381af2721a
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
|
3
3
|
All changes to the Agoo gem are documented here. Releases follow semantic versioning.
|
4
4
|
|
5
|
+
## [2.15.12] - 2024-07-28
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
|
9
|
+
- When multiple threads are specified and the main thread exits worker
|
10
|
+
threads not exit as well.
|
11
|
+
|
5
12
|
## [2.15.11] - 2024-06-04
|
6
13
|
|
7
14
|
### Fixed
|
data/README.md
CHANGED
@@ -101,10 +101,7 @@ of fetches per second. A simple hello world Ruby handler at over 100,000
|
|
101
101
|
requests per second on a desktop computer. That places Agoo at about 85 times
|
102
102
|
faster than Sinatra and 1000 times faster than Rails. In both cases the
|
103
103
|
latency was two orders of magnitude lower or more. Checkout the
|
104
|
-
[benchmarks](
|
105
|
-
the benchmarks had to use a C program called
|
106
|
-
[Perfer](https://github.com/ohler55/perfer) to hit the Agoo limits. Ruby
|
107
|
-
benchmarks driver could not push Agoo hard enough.
|
104
|
+
[benchmarks](https://web-frameworks-benchmark.netlify.app/result?l=ruby).
|
108
105
|
|
109
106
|
Agoo supports the [Ruby rack API](https://rack.github.io) which allows for the
|
110
107
|
use of rack compatible gems such as Hanami and Rails. Agoo also supports WebSockets and SSE.
|
data/ext/agoo/agoo.c
CHANGED
@@ -30,7 +30,7 @@ sig_atomic_t agoo_stop = 0;
|
|
30
30
|
static atomic_int shutdown_started = AGOO_ATOMIC_INT_INIT(0);
|
31
31
|
|
32
32
|
void
|
33
|
-
agoo_shutdown() {
|
33
|
+
agoo_shutdown(void) {
|
34
34
|
if (0 == atomic_fetch_add(&shutdown_started, 1)) {
|
35
35
|
rserver_shutdown(Qnil);
|
36
36
|
agoo_log_close();
|
@@ -99,7 +99,7 @@ sig_handler(int sig) {
|
|
99
99
|
* agoo is a Japanese word for a type of flying fish.
|
100
100
|
*/
|
101
101
|
void
|
102
|
-
Init_agoo() {
|
102
|
+
Init_agoo(void) {
|
103
103
|
VALUE mod = rb_define_module("Agoo");
|
104
104
|
|
105
105
|
rlog_init(mod);
|
data/ext/agoo/debug.c
CHANGED
@@ -291,7 +291,7 @@ update_reps(Rep reps, Rec r) {
|
|
291
291
|
}
|
292
292
|
|
293
293
|
static void
|
294
|
-
print_stats() {
|
294
|
+
print_stats(void) {
|
295
295
|
printf("\n--- Memory Usage Report --------------------------------------------------------\n");
|
296
296
|
pthread_mutex_lock(&lock);
|
297
297
|
|
@@ -320,7 +320,7 @@ print_stats() {
|
|
320
320
|
#endif
|
321
321
|
|
322
322
|
void
|
323
|
-
debug_report() {
|
323
|
+
debug_report(void) {
|
324
324
|
#ifdef MEM_DEBUG
|
325
325
|
print_stats();
|
326
326
|
#endif
|
data/ext/agoo/domain.c
CHANGED
@@ -19,7 +19,7 @@ typedef struct _domain {
|
|
19
19
|
static Domain domains = NULL;
|
20
20
|
|
21
21
|
bool
|
22
|
-
agoo_domain_use() {
|
22
|
+
agoo_domain_use(void) {
|
23
23
|
return NULL != domains;
|
24
24
|
}
|
25
25
|
|
@@ -128,7 +128,7 @@ agoo_domain_resolve(const char *host, char *buf, size_t blen) {
|
|
128
128
|
}
|
129
129
|
|
130
130
|
void
|
131
|
-
agoo_domain_cleanup() {
|
131
|
+
agoo_domain_cleanup(void) {
|
132
132
|
Domain d;
|
133
133
|
|
134
134
|
while (NULL != (d = domains)) {
|
data/ext/agoo/dtime.c
CHANGED
data/ext/agoo/error_stream.c
CHANGED
data/ext/agoo/gqleval.c
CHANGED
@@ -317,7 +317,7 @@ gql_eval_sels(agooErr err, gqlDoc doc, gqlRef ref, gqlField field, gqlSel sels,
|
|
317
317
|
}
|
318
318
|
|
319
319
|
gqlType
|
320
|
-
gql_root_type() {
|
320
|
+
gql_root_type(void) {
|
321
321
|
if (NULL == _gql_root_type && NULL != gql_type_func) {
|
322
322
|
_gql_root_type = gql_type_func(gql_root);
|
323
323
|
}
|
data/ext/agoo/graphql.c
CHANGED
data/ext/agoo/http.c
CHANGED
@@ -465,7 +465,7 @@ key_set(const char *key) {
|
|
465
465
|
}
|
466
466
|
|
467
467
|
void
|
468
|
-
agoo_http_init() {
|
468
|
+
agoo_http_init(void) {
|
469
469
|
const char **kp = header_keys;
|
470
470
|
|
471
471
|
memset(&key_cache, 0, sizeof(struct _cache));
|
@@ -475,7 +475,7 @@ agoo_http_init() {
|
|
475
475
|
}
|
476
476
|
|
477
477
|
void
|
478
|
-
agoo_http_cleanup() {
|
478
|
+
agoo_http_cleanup(void) {
|
479
479
|
Slot *sp = key_cache.buckets;
|
480
480
|
Slot s;
|
481
481
|
Slot n;
|
data/ext/agoo/log.c
CHANGED
@@ -74,7 +74,7 @@ find_color(const char *name) {
|
|
74
74
|
}
|
75
75
|
|
76
76
|
static bool
|
77
|
-
agoo_log_queue_empty() {
|
77
|
+
agoo_log_queue_empty(void) {
|
78
78
|
agooLogEntry head = atomic_load(&agoo_log.head);
|
79
79
|
agooLogEntry next = head + 1;
|
80
80
|
|
@@ -88,7 +88,7 @@ agoo_log_queue_empty() {
|
|
88
88
|
}
|
89
89
|
|
90
90
|
static int
|
91
|
-
agoo_log_listen() {
|
91
|
+
agoo_log_listen(void) {
|
92
92
|
if (0 == agoo_log.rsock) {
|
93
93
|
int fd[2];
|
94
94
|
|
@@ -105,7 +105,7 @@ agoo_log_listen() {
|
|
105
105
|
}
|
106
106
|
|
107
107
|
static void
|
108
|
-
agoo_log_release() {
|
108
|
+
agoo_log_release(void) {
|
109
109
|
char buf[8];
|
110
110
|
|
111
111
|
// clear pipe
|
@@ -233,7 +233,7 @@ classic_write(agooLogEntry e, FILE *file) {
|
|
233
233
|
// Remove all file with sequence numbers higher than max_files. max_files is
|
234
234
|
// max number of archived version. It does not include the primary.
|
235
235
|
static void
|
236
|
-
remove_old_logs() {
|
236
|
+
remove_old_logs(void) {
|
237
237
|
struct dirent *de;
|
238
238
|
long seq;
|
239
239
|
char *end;
|
@@ -271,7 +271,7 @@ remove_old_logs() {
|
|
271
271
|
}
|
272
272
|
|
273
273
|
void
|
274
|
-
agoo_log_rotate() {
|
274
|
+
agoo_log_rotate(void) {
|
275
275
|
char from[1060];
|
276
276
|
char to[1060];
|
277
277
|
int seq;
|
@@ -356,7 +356,7 @@ agoo_log_flush(double timeout) {
|
|
356
356
|
}
|
357
357
|
|
358
358
|
void
|
359
|
-
agoo_log_open_file() {
|
359
|
+
agoo_log_open_file(void) {
|
360
360
|
char path[1500];
|
361
361
|
|
362
362
|
if (agoo_log.with_pid) {
|
@@ -379,7 +379,7 @@ agoo_log_open_file() {
|
|
379
379
|
}
|
380
380
|
|
381
381
|
void
|
382
|
-
agoo_log_close() {
|
382
|
+
agoo_log_close(void) {
|
383
383
|
agoo_log.done = true;
|
384
384
|
// TBD wake up loop like push does
|
385
385
|
agoo_log_cat_on(NULL, false);
|
@@ -450,7 +450,7 @@ agoo_log_cat_find(const char *label) {
|
|
450
450
|
|
451
451
|
#ifdef CLOCK_REALTIME
|
452
452
|
int64_t
|
453
|
-
agoo_now_nano() {
|
453
|
+
agoo_now_nano(void) {
|
454
454
|
struct timespec ts;
|
455
455
|
|
456
456
|
clock_gettime(CLOCK_REALTIME, &ts);
|
@@ -459,7 +459,7 @@ agoo_now_nano() {
|
|
459
459
|
}
|
460
460
|
#else
|
461
461
|
int64_t
|
462
|
-
agoo_now_nano() {
|
462
|
+
agoo_now_nano(void) {
|
463
463
|
struct timeval tv;
|
464
464
|
struct timezone tz;
|
465
465
|
|
data/ext/agoo/page.c
CHANGED
data/ext/agoo/rack_logger.c
CHANGED
data/ext/agoo/rresponse.c
CHANGED
data/ext/agoo/rserver.c
CHANGED
@@ -809,6 +809,10 @@ wrap_process_loop(void *ptr) {
|
|
809
809
|
return Qnil;
|
810
810
|
}
|
811
811
|
|
812
|
+
static void stop_server(VALUE x) {
|
813
|
+
agoo_server.active = false;
|
814
|
+
}
|
815
|
+
|
812
816
|
/* Document-method: start
|
813
817
|
*
|
814
818
|
* call-seq: start()
|
@@ -908,11 +912,13 @@ rserver_start(VALUE self) {
|
|
908
912
|
dsleep(0.05);
|
909
913
|
}
|
910
914
|
}
|
915
|
+
rb_set_end_proc(stop_server, Qnil);
|
916
|
+
|
911
917
|
return Qnil;
|
912
918
|
}
|
913
919
|
|
914
920
|
static void
|
915
|
-
stop_runners() {
|
921
|
+
stop_runners(void) {
|
916
922
|
// The preferred method of waiting for the ruby threads would be either a
|
917
923
|
// join or even a kill but since we may not have the gvl here that would
|
918
924
|
// cause a segfault. Instead we set a timeout and wait for the running
|
data/lib/agoo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: agoo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.15.
|
4
|
+
version: 2.15.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Ohler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|
@@ -209,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
209
|
version: '0'
|
210
210
|
requirements:
|
211
211
|
- Linux or macOS
|
212
|
-
rubygems_version: 3.4.
|
212
|
+
rubygems_version: 3.4.10
|
213
213
|
signing_key:
|
214
214
|
specification_version: 4
|
215
215
|
summary: An HTTP server
|