File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -84,24 +84,21 @@ def __error(e, m=nil)
84
84
end
85
85
86
86
def run ( &blk )
87
- id = 0
88
- silent = false
89
- info = { } . freeze
90
- now = Time . now . freeze
87
+ id = 0
88
+ silent = false
89
+ info = { } . freeze
90
+ now = Time . now . freeze
91
91
job_in_thread = nil
92
- job = Thread . new do
92
+ job = Thread . new do
93
93
Thread . current . abort_on_exception = true
94
94
95
-
96
95
reg_job 0 , Thread . current
97
96
__system_thread_locals . set_local :sonic_pi_local_thread_group , "job-#{ id } "
98
97
__system_thread_locals . set_local :sonic_pi_spider_thread_id_path , ThreadId . new ( id )
99
98
__system_thread_locals . set :sonic_pi_spider_job_id , id
100
99
__system_thread_locals . set :sonic_pi_spider_silent , silent
101
100
__system_thread_locals . set :sonic_pi_spider_job_info , info
102
-
103
101
__reset_spider_time_and_beat!
104
-
105
102
__system_thread_locals . set_local :sonic_pi_local_spider_delayed_messages , [ ]
106
103
107
104
__set_default_system_thread_locals!
@@ -112,7 +109,9 @@ def run(&blk)
112
109
self . instance_eval ( &blk )
113
110
end
114
111
end
112
+
115
113
@user_jobs . add_job ( id , job , info )
114
+
116
115
t = Thread . new do
117
116
Thread . current . priority = -10
118
117
__system_thread_locals . set_local ( :sonic_pi_local_thread_group , "job-#{ id } -GC" )
You can’t perform that action at this time.
0 commit comments