kobako 0.9.1 → 0.10.0

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.
@@ -0,0 +1,44 @@
1
+ module Kobako
2
+ class Pool
3
+ DEFAULT_CHECKOUT_TIMEOUT_SECONDS: Float
4
+
5
+ @slots: Integer
6
+ @checkout_timeout: Float?
7
+ @sandbox_options: Hash[Symbol, untyped]
8
+ @setup: ^(Kobako::Sandbox) -> void | nil
9
+ @idle: Array[Kobako::Sandbox]
10
+ @constructed: Integer
11
+ @mutex: Thread::Mutex
12
+ @slot_freed: Thread::ConditionVariable
13
+
14
+ def initialize: (
15
+ slots: Integer,
16
+ ?checkout_timeout: (Float | Integer)?,
17
+ **untyped sandbox_options
18
+ ) ?{ (Kobako::Sandbox) -> void } -> void
19
+
20
+ def with: [T] () { (Kobako::Sandbox) -> T } -> T
21
+
22
+ private
23
+
24
+ def checkout: () -> Kobako::Sandbox
25
+
26
+ def acquire: () -> Kobako::Sandbox
27
+
28
+ def claim_or_wait: (Float? deadline) -> [Symbol, Kobako::Sandbox?]
29
+
30
+ def await_slot!: (Float? deadline) -> void
31
+
32
+ def construct_slot: () -> Kobako::Sandbox
33
+
34
+ def checkin: (Kobako::Sandbox sandbox) -> void
35
+
36
+ def release_capacity!: () -> void
37
+
38
+ def monotonic_now: () -> Float
39
+
40
+ def validate_slots!: (untyped slots) -> void
41
+
42
+ def normalize_checkout_timeout: ((Float | Integer)? checkout_timeout) -> Float?
43
+ end
44
+ end
@@ -38,12 +38,12 @@ module Kobako
38
38
 
39
39
  def eval: (String code) -> untyped
40
40
 
41
+ def reset_invocation_state!: () -> void
42
+
41
43
  private
42
44
 
43
45
  def install_dispatch_proc!: () -> void
44
46
 
45
- def reset_invocation_state!: () -> void
46
-
47
47
  def begin_invocation!: () -> void
48
48
 
49
49
  def read_usage!: () -> void
@@ -8,6 +8,10 @@ module Kobako
8
8
 
9
9
  META_OWNERS: Array[Module]
10
10
 
11
+ GADGET_OWNERS: Array[Module]
12
+
13
+ CALLABLE_ALLOW: Array[Symbol]
14
+
11
15
  def self?.dispatch: (String request_bytes, Kobako::Catalog::Namespaces namespaces, Kobako::Catalog::Handles handler, ^(String) -> String yield_to_guest) -> String
12
16
 
13
17
  def self?.resolve_call_args: (Kobako::Transport::Request request, Kobako::Catalog::Handles handler) -> [Array[untyped], Hash[Symbol, untyped]]
@@ -1,8 +1,5 @@
1
1
  module Kobako
2
2
  module Transport
3
- STATUS_OK: Integer
4
- STATUS_ERROR: Integer
5
-
6
3
  class Request < Data
7
4
  attr_reader target: String | Kobako::Handle
8
5
  attr_reader method_name: String
@@ -1,5 +1,8 @@
1
1
  module Kobako
2
2
  module Transport
3
+ STATUS_OK: Integer
4
+ STATUS_ERROR: Integer
5
+
3
6
  class Response < Data
4
7
  attr_reader status: Integer
5
8
  attr_reader payload: untyped
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kobako
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aotokitsuruya
@@ -58,12 +58,14 @@ files:
58
58
  - ext/kobako/extconf.rb
59
59
  - ext/kobako/src/lib.rs
60
60
  - ext/kobako/src/runtime.rs
61
+ - ext/kobako/src/runtime/ambient.rs
61
62
  - ext/kobako/src/runtime/cache.rs
62
63
  - ext/kobako/src/runtime/capture.rs
63
64
  - ext/kobako/src/runtime/config.rs
64
65
  - ext/kobako/src/runtime/dispatch.rs
65
66
  - ext/kobako/src/runtime/exports.rs
66
67
  - ext/kobako/src/runtime/guest_mem.rs
68
+ - ext/kobako/src/runtime/instance_pre.rs
67
69
  - ext/kobako/src/runtime/invocation.rs
68
70
  - ext/kobako/src/runtime/trap.rs
69
71
  - ext/kobako/src/snapshot.rs
@@ -85,6 +87,7 @@ files:
85
87
  - lib/kobako/namespace.rb
86
88
  - lib/kobako/outcome.rb
87
89
  - lib/kobako/outcome/panic.rb
90
+ - lib/kobako/pool.rb
88
91
  - lib/kobako/runtime.rb
89
92
  - lib/kobako/sandbox.rb
90
93
  - lib/kobako/sandbox_options.rb
@@ -122,6 +125,7 @@ files:
122
125
  - sig/kobako/namespace.rbs
123
126
  - sig/kobako/outcome.rbs
124
127
  - sig/kobako/outcome/panic.rbs
128
+ - sig/kobako/pool.rbs
125
129
  - sig/kobako/runtime.rbs
126
130
  - sig/kobako/sandbox.rbs
127
131
  - sig/kobako/sandbox_options.rbs