pycall_thread 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +3 -3
- data/Gemfile.lock +1 -1
- data/examples/puma/Gemfile +1 -1
- data/examples/puma/Gemfile.lock +3 -3
- data/examples/puma/app.rb +2 -1
- data/lib/pycall_thread/version.rb +1 -1
- data/lib/pycall_thread.rb +2 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de04a7790f025c9450436bf4258476136b2a9e55732fa0adcbfc9671ecdf2840
|
4
|
+
data.tar.gz: db51f2e173305c25bff70add0a291e442c3beb1eee425b5d0aeef1a74a522a5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2aa5641cc051976e0cddd405bf98960881ab2ee698c1c35bdbf9fff6cf11bd57ed2cf6515ba140ffce0972e544d4eecce724fcd2a2db83491ec0424319d692c8
|
7
|
+
data.tar.gz: 4156c6dbaafbd74ccca113e44aff8fe4760336c12b0965c05b4e805031d0cb5b133a782c3ccd690e6d70a0b875f25bccb557eb8fbd1c751570073ab42beafadb
|
data/Gemfile
CHANGED
@@ -5,11 +5,11 @@ source "https://rubygems.org"
|
|
5
5
|
# Specify your gem's dependencies in pycall_thread.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
-
gem "rake", "~> 13.0"
|
9
8
|
gem "minitest", "~> 5.0"
|
9
|
+
gem "rake", "~> 13.0"
|
10
10
|
gem "rubocop", "~> 1.21"
|
11
11
|
|
12
12
|
# To use the local pycall, you must also run things with e.g.:
|
13
13
|
# bundle exec ruby -I/Users/seth/src/pycall.rb/ext/pycall
|
14
|
-
#
|
15
|
-
# gem 'pycall', path: '/Users/seth/src/pycall.rb', require: false
|
14
|
+
#
|
15
|
+
# gem 'pycall', path: '/Users/seth/src/pycall.rb', require: false
|
data/Gemfile.lock
CHANGED
data/examples/puma/Gemfile
CHANGED
data/examples/puma/Gemfile.lock
CHANGED
@@ -5,15 +5,15 @@ GEM
|
|
5
5
|
puma (6.4.2)
|
6
6
|
nio4r (~> 2.0)
|
7
7
|
pycall (1.5.2)
|
8
|
-
pycall_thread (0.1.
|
8
|
+
pycall_thread (0.1.2)
|
9
9
|
pycall
|
10
10
|
|
11
11
|
PLATFORMS
|
12
12
|
arm64-darwin-23
|
13
13
|
|
14
14
|
DEPENDENCIES
|
15
|
-
puma
|
16
|
-
pycall_thread
|
15
|
+
puma (~> 6.4.2)
|
16
|
+
pycall_thread (~> 0.1.2)
|
17
17
|
|
18
18
|
BUNDLED WITH
|
19
19
|
2.2.33
|
data/examples/puma/app.rb
CHANGED
data/lib/pycall_thread.rb
CHANGED
@@ -12,14 +12,13 @@ module PyCallThread
|
|
12
12
|
|
13
13
|
# Start the thread we will use to run code invoked with PyCallThread.run
|
14
14
|
@py_thread = Thread.new { pycall_thread_loop }
|
15
|
+
@initialized = true
|
15
16
|
|
16
17
|
# If we've been passed a require_pycall_block, use that to require 'pycall'
|
17
18
|
# instead of doing it directly.
|
18
19
|
require_pycall(&require_pycall_block)
|
19
20
|
|
20
21
|
at_exit { stop_pycall_thread }
|
21
|
-
|
22
|
-
@initialized = true
|
23
22
|
end
|
24
23
|
|
25
24
|
def self.require_pycall(&require_pycall_block)
|
@@ -53,7 +52,7 @@ module PyCallThread
|
|
53
52
|
run_result(result_queue.pop)
|
54
53
|
end
|
55
54
|
|
56
|
-
def self.run_result
|
55
|
+
def self.run_result(result)
|
57
56
|
if result[:exception]
|
58
57
|
raise result[:exception]
|
59
58
|
elsif python_object?(result[:retval])
|