musa-dsl 0.14.29 → 0.14.31

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
  SHA256:
3
- metadata.gz: 8f74dd3331fee5343754a2a50d2a8b449588e2bf4355bcc0c040aae1d3947ed4
4
- data.tar.gz: '009c5e942ef81604a8c0742deb8ad0c54e196a4236e0f3d5635948754194d7d1'
3
+ metadata.gz: b0d0e02c2e0316db71806cd4a1370c6f7488d074c7f0c56f9debefa68e041d14
4
+ data.tar.gz: 4d6e5c5f7dcd225ed5cb4f2f01129fa12a15be16253f5bfcb8cedf07c1bb6296
5
5
  SHA512:
6
- metadata.gz: 1b731f4fc517e25458f7592ef2e79b6ed4b15ef9ba2e08d099879cb1ba83075da8fdb677a76ac937a42efad4e99f4d40b1e43949cc0b06e11d8c396cd31beea2
7
- data.tar.gz: e245ea33a9f473a8676c9ace488287f33977bb66e8dc0bfc24fc3737ef4fcabe461ba05303aa96bafe974b85127f0fc258b81100ea0dbdd8d954f1c5aa73e228
6
+ metadata.gz: d7872920c8d0b01d28ea8359a7bccb84937820dcb1ce4cb98a158c351ac46f9e5a802d5986b6e7b584f3c527dd9be65e2df75d31dc5fa7394296dc2123ed4b5d
7
+ data.tar.gz: a2dae59c40f1e713593a691e93ba989ee3aed3fe176b7da81e01aec579db83afc1c91d082c2915150249ab55a124c5f45f15fc99f506cc1cbdc3fb6a5d237d83
@@ -19,16 +19,17 @@ module Musa
19
19
  end
20
20
 
21
21
  @client_threads = []
22
+ @run = true
22
23
 
23
24
  @main_thread = Thread.new do
24
25
  @server = TCPServer.new(port)
25
26
  begin
26
- while connection = @server.accept
27
+ while (connection = @server.accept) && @run
27
28
  @client_threads << Thread.new do
28
29
  buffer = nil
29
30
 
30
31
  begin
31
- while line = connection.gets
32
+ while (line = connection.gets) && @run
32
33
  line.chomp!
33
34
  case line
34
35
  when '#begin'
@@ -75,7 +76,13 @@ module Musa
75
76
  end
76
77
 
77
78
  def stop
78
- # TODO
79
+ @run = false
80
+
81
+ @main_thread.terminate
82
+ @client_threads.each { |t| t.terminate }
83
+
84
+ @main_thread = nil
85
+ @client_threads.clear
79
86
  end
80
87
 
81
88
  private
data/musa-dsl.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'musa-dsl'
3
- s.version = '0.14.29'
4
- s.date = '2019-09-30'
3
+ s.version = '0.14.31'
4
+ s.date = '2019-10-03'
5
5
  s.summary = 'A simple Ruby DSL for making complex music'
6
6
  s.description = 'Musa-DSL: A Ruby DSL for algorithmic music composition, device language neutral (MIDI, OSC, etc)'
7
7
  s.authors = ['Javier Sánchez Yeste']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: musa-dsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.29
4
+ version: 0.14.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Sánchez Yeste
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-30 00:00:00.000000000 Z
11
+ date: 2019-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: citrus