iodine 0.2.5 → 0.2.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 765b6fa27478c971c926fe4010ebde8c95d970a3
4
- data.tar.gz: 740963e010629bb812d6de4e4167375bed0b0bf3
3
+ metadata.gz: 227ead92403069fa835295863ddaf99c1ba87ca8
4
+ data.tar.gz: 78a7b0dda1d37631471bc77018f985181ab20ff8
5
5
  SHA512:
6
- metadata.gz: 9ebd38a0c3442d787af596ca73a26481673697727e891026355722a33e897d3a631c4569669bfb041c61653df0c2248a3b51a20780002c9603e36fa538ea67e0
7
- data.tar.gz: 2e31973b2bc6ec931001c8cdac8a09bd3e3d3ac6fb74e8c7749d80f0daf4419057f95db0151c3205eb441c4a3ac07c3938ea5e9a52c98944ea1b39c8a86328fc
6
+ metadata.gz: b28193f978e8ea93aab821e7109386a0df6e617396c6588732724e96e52587a0a0a48ecf742f5fa3c474f2c00bed38442db9bb53520cf725311d3c3464437f28
7
+ data.tar.gz: 852b315197992b6fd55213015b6dc5bd0ae06b98c6420a6fde671c373c436676a09e89287c15307224dbb9d8ea467e2ce78bfa1a728c40797184ffabfe8e9baa
@@ -8,11 +8,17 @@ Please notice that this change log contains changes for upcoming releases as wel
8
8
 
9
9
  ***
10
10
 
11
+ Change log v.0.2.6
12
+
13
+ **Update**: The IO reactor review will now be delayed until all events scheduled are done. This means that is events schedule future events, no IO data will be reviewed until all scheduled data is done. Foolish use might cause infinite loops that skip the IO reactor, but otherwise performance is improved (since the IO reactor might cause a thread to "sleep", delaying event execution).
14
+
15
+ ***
16
+
11
17
  Change log v.0.2.5
12
18
 
13
19
  **Fix:**: fix for issue #9 (credit to Jack Christensen for exposing the issue) caused by an unlocked critical section's "window of opportunity" that allowed asynchronous Websocket `each` blocks to run during the tail of the Websocket handshake (while the `on_open` callback was running in parallel).
14
20
 
15
- **Minor Fix**: Fix Iodine::Rack's startup message's `fprint` call to fit correct argument sizes (Linux warnings).
21
+ **Minor Fix**: Fix Iodine::Rack's startup message's `fprintf` call to fit correct argument sizes (Linux warnings).
16
22
 
17
23
  ***
18
24
 
@@ -32,7 +32,7 @@ else
32
32
  check_for_stdatomics
33
33
  end
34
34
 
35
- $CFLAGS = '-std=c11 -O3 -Wall'
35
+ $CFLAGS = '-std=c11 -O3 -Wall -DSERVER_DELAY_IO=1'
36
36
  RbConfig::MAKEFILE_CONFIG['CC'] = $CC = ENV['CC'] if ENV['CC']
37
37
  RbConfig::MAKEFILE_CONFIG['CPP'] = $CPP = ENV['CPP'] if ENV['CPP']
38
38
 
@@ -458,6 +458,9 @@ static void server_cycle(void *_) {
458
458
  } else {
459
459
  perform_idle = 1;
460
460
  }
461
+ #if SERVER_DELAY_IO
462
+ async_perform();
463
+ #endif
461
464
  async_run(server_cycle, NULL);
462
465
  }
463
466
  }
@@ -15,16 +15,23 @@ Feel free to copy, use and enjoy according to the license provided.
15
15
  #endif
16
16
 
17
17
  #include <stdint.h>
18
- #include <unistd.h>
19
18
  #include <stdio.h>
20
19
  #include <stdlib.h>
20
+ #include <unistd.h>
21
21
 
22
22
  /* lib server is based off and requires the following libraries: */
23
- #include "libreact.h"
24
23
  #include "libasync.h"
24
+ #include "libreact.h"
25
25
  #include "libsock.h"
26
26
  #include "spnlock.h"
27
27
 
28
+ /** Set `SERVER_DELAY_IO` to 1 in order to delay the IO reactor review
29
+ * until the queue for scheduled tasks and events is empty.
30
+ */
31
+ #ifndef SERVER_DELAY_IO
32
+ #define SERVER_DELAY_IO 0
33
+ #endif
34
+
28
35
  #ifndef SERVER_PRINT_STATE
29
36
  /**
30
37
  When SERVER_PRINT_STATE is set to 1, the server API will print out common
@@ -1,3 +1,3 @@
1
1
  module Iodine
2
- VERSION = '0.2.5'.freeze
2
+ VERSION = '0.2.6'.freeze
3
3
  end
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.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boaz Segev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-18 00:00:00.000000000 Z
11
+ date: 2016-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack