lightio 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +4 -14
- data/lib/lightio/version.rb +1 -1
- data/lib/lightio/watchers/io.rb +7 -0
- data/lightio.gemspec +2 -2
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c471b6d1a0f049a6db03568e4f2ab5c0ac718f7c
|
4
|
+
data.tar.gz: 6cf6282f1f363bb1f01eea73fa7443e485b64e0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 430b7f1839c6d72ec0fa5e28164965b55a3a3f616d8d94f5f3a5070b97f5c7e5905b78b859520d5f7012e323b0c54a034dc3ac526e961703a0d8f798992fb29b
|
7
|
+
data.tar.gz: ba69751cc11872bd57fe32f8aa8f5e6202cd0fce3331ba8e8182e9523ac2f8dcdff0f80aa65d9024ff063a5aa436c2c63f5f7fa24fb8197f9c66c0cfff3cdb47
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -5,23 +5,13 @@
|
|
5
5
|
[![Build Status](https://travis-ci.org/jjyr/lightio.svg?branch=master)](https://travis-ci.org/jjyr/lightio)
|
6
6
|
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jjyr/lightio/blob/master/LICENSE.txt)
|
7
7
|
|
8
|
-
LightIO is a ruby networking library, that combines ruby fiber and IO event loop
|
8
|
+
LightIO is a ruby networking library, that combines ruby fiber and fast IO event loop.
|
9
9
|
|
10
|
+
The intent of LightIO is to provide ruby stdlib compatible modules, that user can use these modules instead stdlib, to gain the benefits of IO event loop without care any details about react or async programming.
|
10
11
|
|
11
|
-
|
12
|
+
See [Wiki](https://github.com/jjyr/lightio/wiki) and [Roadmap](https://github.com/jjyr/lightio/wiki/Current-status-and-roadmap) to get more information.
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
This library is still **WIP**, *watch* or *star* this repo for further information.
|
16
|
-
Its not recommendation to use LightIO in production now, but you can always give a try. open a issue if you have any question.
|
17
|
-
|
18
|
-
Before we release a full networking framework at the version 1.0.0, there are three targets(milestones).
|
19
|
-
|
20
|
-
1. Provide a bare-bone framework, include fiber based lightweight executor and a way to collebrate with ruby socket library
|
21
|
-
2. Provide lightio networking libraries, that have the same API with ruby stdlib
|
22
|
-
3. Implement ruby stdlib monkey patch, user can apply monkey patch and just write normal ruby code to get the power of lightio
|
23
|
-
|
24
|
-
Thanks to [nio4r](https://github.com/socketry/nio4r), the first target is already achieved.
|
14
|
+
LightIO is build upon [nio4r](https://github.com/socketry/nio4r). Get heavily inspired by [gevent](http://www.gevent.org/), [async-io](https://github.com/socketry/async-io).
|
25
15
|
|
26
16
|
|
27
17
|
## Installation
|
data/lib/lightio/version.rb
CHANGED
data/lib/lightio/watchers/io.rb
CHANGED
@@ -22,6 +22,13 @@ module LightIO::Watchers
|
|
22
22
|
@wait_for = nil
|
23
23
|
# NIO monitor
|
24
24
|
@monitor = @ioloop.add_io_wait(@io, interests) {callback_on_waiting}
|
25
|
+
ObjectSpace.define_finalizer(self, self.class.finalizer(@monitor))
|
26
|
+
end
|
27
|
+
|
28
|
+
class << self
|
29
|
+
def finalizer(monitor)
|
30
|
+
proc {monitor.close if monitor && !monitor.close?}
|
31
|
+
end
|
25
32
|
end
|
26
33
|
|
27
34
|
def interests
|
data/lightio.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["jjy"]
|
10
10
|
spec.email = ["jjyruby@gmail.com"]
|
11
11
|
|
12
|
-
spec.summary = %q{LightIO is a
|
13
|
-
spec.description = %q{LightIO
|
12
|
+
spec.summary = %q{LightIO is a ruby networking library, that combines ruby fiber and fast IO event loop.}
|
13
|
+
spec.description = %q{The intent of LightIO is to provide ruby stdlib compatible modules, that user can use these modules instead stdlib, to gain the benefits of IO event loop without care any details about react or async programming.}
|
14
14
|
spec.homepage = "https://github.com/jjyr/lightio"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lightio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jjy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nio4r
|
@@ -66,8 +66,9 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.0'
|
69
|
-
description:
|
70
|
-
|
69
|
+
description: The intent of LightIO is to provide ruby stdlib compatible modules, that
|
70
|
+
user can use these modules instead stdlib, to gain the benefits of IO event loop
|
71
|
+
without care any details about react or async programming.
|
71
72
|
email:
|
72
73
|
- jjyruby@gmail.com
|
73
74
|
executables: []
|
@@ -129,5 +130,6 @@ rubyforge_project:
|
|
129
130
|
rubygems_version: 2.6.11
|
130
131
|
signing_key:
|
131
132
|
specification_version: 4
|
132
|
-
summary: LightIO is a
|
133
|
+
summary: LightIO is a ruby networking library, that combines ruby fiber and fast IO
|
134
|
+
event loop.
|
133
135
|
test_files: []
|