iodine 0.4.18 → 0.4.19
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of iodine might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/ext/iodine/facil.c +6 -0
- data/ext/iodine/facil.h +5 -0
- data/ext/iodine/iodine.c +6 -0
- data/lib/iodine/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b93946ad1ced55f2345f08bb90b3147ba0f8c1262391e34121cfc94b1b43d43
|
4
|
+
data.tar.gz: a724632ed98f2aa7998465fba68b4d6115fccdae29c1442b8fcfcecccc0fcbd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2455dd897c6628120810579c75c6c7c8f235a150ae0c500a60fabf99d99eda81083c39845790723a229c8ab6a4602e7ad16521122c6e4d68b026d6d36d716001
|
7
|
+
data.tar.gz: d2fa620f1b1510900c17048c4fd11276d04c218e0ab78775ac067afa041c65a0eac22ec30bbe218c4669d099c16058cf886d92ed2a08e02836a5195fad43139c
|
data/CHANGELOG.md
CHANGED
@@ -8,6 +8,10 @@ Please notice that this change log contains changes for upcoming releases as wel
|
|
8
8
|
|
9
9
|
---
|
10
10
|
|
11
|
+
#### Change log v.0.4.19
|
12
|
+
|
13
|
+
**Feature**: (`iodine`) added requested feature in issue #27, `Iodine.running?` will return Iodine's state.
|
14
|
+
|
11
15
|
#### Change log v.0.4.18
|
12
16
|
|
13
17
|
**Fix**: (`iodine pub/bus`) fixed issue #27 (?) where the `block` used for subscriptions would be recycled by the GC and the memory address (retained by `iodine`) would point at invalid Ruby objects (at worst) or become invalid (at best). Credit to Dmitry Davydov (@haukot) for exposing this issue.
|
data/ext/iodine/facil.c
CHANGED
@@ -1103,6 +1103,12 @@ void facil_run(struct facil_run_args args) {
|
|
1103
1103
|
if (FACIL_PRINT_STATE)
|
1104
1104
|
fprintf(stderr, "\n --- Completed Shutdown ---\n");
|
1105
1105
|
}
|
1106
|
+
|
1107
|
+
/**
|
1108
|
+
* returns true (1) if the facil.io engine is already running.
|
1109
|
+
*/
|
1110
|
+
int facil_is_running(void) { return (facil_data && defer_fork_is_active()); }
|
1111
|
+
|
1106
1112
|
/* *****************************************************************************
|
1107
1113
|
Setting the protocol
|
1108
1114
|
***************************************************************************** */
|
data/ext/iodine/facil.h
CHANGED
@@ -285,6 +285,11 @@ struct facil_run_args {
|
|
285
285
|
void facil_run(struct facil_run_args args);
|
286
286
|
#define facil_run(...) facil_run((struct facil_run_args){__VA_ARGS__})
|
287
287
|
|
288
|
+
/**
|
289
|
+
* returns true (1) if the facil.io engine is already running.
|
290
|
+
*/
|
291
|
+
int facil_is_running(void);
|
292
|
+
|
288
293
|
/**
|
289
294
|
* Attaches (or updates) a protocol object to a socket UUID.
|
290
295
|
*
|
data/ext/iodine/iodine.c
CHANGED
@@ -317,6 +317,11 @@ static VALUE iodine_start(VALUE self) {
|
|
317
317
|
return self;
|
318
318
|
}
|
319
319
|
|
320
|
+
static VALUE iodine_is_running(VALUE self) {
|
321
|
+
return (facil_is_running() ? Qtrue : Qfalse);
|
322
|
+
(void)self;
|
323
|
+
}
|
324
|
+
|
320
325
|
/* *****************************************************************************
|
321
326
|
Debug
|
322
327
|
***************************************************************************** */
|
@@ -374,6 +379,7 @@ void Init_iodine(void) {
|
|
374
379
|
|
375
380
|
// the Iodine singleton functions
|
376
381
|
rb_define_module_function(Iodine, "start", iodine_start, 0);
|
382
|
+
rb_define_module_function(Iodine, "running?", iodine_is_running, 0);
|
377
383
|
rb_define_singleton_method(Iodine, "count", iodine_count, 0);
|
378
384
|
rb_define_module_function(Iodine, "run", iodine_run, 0);
|
379
385
|
rb_define_module_function(Iodine, "run_after", iodine_run_after, 1);
|
data/lib/iodine/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iodine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boaz Segev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|