Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
28c50b3e
Unverified
Commit
28c50b3e
authored
Sep 04, 2018
by
Yukihiro "Matz" Matsumoto
Committed by
GitHub
Sep 04, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4101 from take-cheeze/fix_4085
Avoid root fiber initialization for CRuby.
parents
02adae16
901dccb2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
minirake
minirake
+14
-6
No files found.
minirake
View file @
28c50b3e
...
@@ -6,12 +6,10 @@
...
@@ -6,12 +6,10 @@
require
'getoptlong'
require
'getoptlong'
require
'fileutils'
require
'fileutils'
require
'fiber'
$rake_fiber_table
=
{}
$rake_fiber_table
=
{}
$rake_jobs
=
1
$rake_jobs
=
1
$rake_failed
=
[]
$rake_failed
=
[]
$rake_root_fiber
=
Fiber
.
current
class
String
class
String
def
ext
(
newext
=
''
)
def
ext
(
newext
=
''
)
...
@@ -111,9 +109,13 @@ module MiniRake
...
@@ -111,9 +109,13 @@ module MiniRake
if
needed?
if
needed?
@running
=
true
@running
=
true
return
Fiber
.
new
do
if
$rake_root_fiber
return
Fiber
.
new
do
self
.
execute
$rake_root_fiber
.
transfer
end
else
self
.
execute
self
.
execute
$rake_root_fiber
.
transfer
end
end
end
end
...
@@ -308,7 +310,7 @@ module MiniRake
...
@@ -308,7 +310,7 @@ module MiniRake
def
sh
(
cmd
)
def
sh
(
cmd
)
puts
cmd
if
$verbose
puts
cmd
if
$verbose
if
$rake_jobs
==
1
||
Fiber
.
current
==
$rake_root_fiber
if
!
$rake_root_fiber
||
Fiber
.
current
==
$rake_root_fiber
system
(
cmd
)
or
fail
"Command Failed: [
#{
cmd
}
]"
system
(
cmd
)
or
fail
"Command Failed: [
#{
cmd
}
]"
return
return
end
end
...
@@ -480,6 +482,12 @@ class RakeApp
...
@@ -480,6 +482,12 @@ class RakeApp
# Run the +rake+ application.
# Run the +rake+ application.
def
run
def
run
handle_options
handle_options
if
$rake_root_fiber
require
'fiber'
$rake_root_fiber
=
Fiber
.
current
end
begin
begin
here
=
Dir
.
pwd
here
=
Dir
.
pwd
while
!
have_rakefile
while
!
have_rakefile
...
@@ -590,7 +598,7 @@ class RakeApp
...
@@ -590,7 +598,7 @@ class RakeApp
wait_process
(
count
+
1
)
if
!
$rake_fiber_table
.
empty?
&&
exited
.
empty?
wait_process
(
count
+
1
)
if
!
$rake_fiber_table
.
empty?
&&
exited
.
empty?
end
end
end
end
if
__FILE__
==
$0
then
if
__FILE__
==
$0
then
RakeApp
.
new
.
run
RakeApp
.
new
.
run
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment