architect 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 233edbf05b66746772b272c2081ffd5191aeea92
|
4
|
+
data.tar.gz: c62ee559568eb7cec889454e611447fafc014d41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aff80886300d41b21350d06a39ce54f6f2759d0a57a53cd2e53acd1c049e619fdbb2046e17b02f9c76af837bef35dbd760ecf863f454134e7c861cb05d073ebf
|
7
|
+
data.tar.gz: 80dc166055e6c3477ee2437751213b42857f876965db89c6473386699e75f0613adeec57840df73abe826f7c9148582135fef256db50371eac36286bc9c14069
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
## [v0.0.3](https://github.com/EtienneLem/architect/tree/v0.0.3)
|
2
|
+
- Fix long-lived workers callback bug
|
3
|
+
|
4
|
+
## [v0.0.2](https://github.com/EtienneLem/architect/tree/v0.0.2)
|
5
|
+
- Long-lived workers
|
6
|
+
|
7
|
+
## [v0.0.1](https://github.com/EtienneLem/architect/tree/v0.0.1)
|
8
|
+
Initial release
|
9
|
+
- Short-lived workers
|
@@ -27,15 +27,15 @@ spawnWorker = (type) ->
|
|
27
27
|
|
28
28
|
# Long-lived workers
|
29
29
|
jobs = {}
|
30
|
-
@Architect.workOn = (jobName, data, type,
|
30
|
+
@Architect.workOn = (jobName, data, type, @workOnCallback) ->
|
31
31
|
alreadySpawned = !!jobs[jobName]
|
32
32
|
|
33
33
|
worker = jobs[jobName] ||= spawnWorker(type)
|
34
34
|
worker.postMessage(data)
|
35
35
|
|
36
36
|
return if alreadySpawned
|
37
|
-
worker.addEventListener 'message', (e)
|
38
|
-
|
37
|
+
worker.addEventListener 'message', (e) =>
|
38
|
+
@workOnCallback(e.data)
|
39
39
|
|
40
40
|
@Architect.endJob = (jobName) ->
|
41
41
|
return unless worker = jobs[jobName]
|
data/lib/architect/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: architect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Etienne Lemay
|
@@ -95,6 +95,7 @@ files:
|
|
95
95
|
- Rakefile
|
96
96
|
- MIT-LICENSE
|
97
97
|
- README.md
|
98
|
+
- CHANGELOG.md
|
98
99
|
homepage: https://github.com/EtienneLem/architect
|
99
100
|
licenses:
|
100
101
|
- MIT
|