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
48ba7c7b
Unverified
Commit
48ba7c7b
authored
Jun 22, 2018
by
take-cheeze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increase sleep duration exponentially instead of `Thread.pass`.
parent
36714043
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
minirake
minirake
+6
-3
No files found.
minirake
View file @
48ba7c7b
...
...
@@ -562,8 +562,9 @@ class RakeApp
exit
1
end
def
wait_process
Thread
.
pass
def
wait_process
(
count
=
0
)
dur
=
[
0.0001
*
(
10
**
count
),
1
].
min
sleep
dur
exited
=
[]
$rake_fiber_table
.
each
do
|
pid
,
v
|
...
...
@@ -581,10 +582,12 @@ class RakeApp
raise
"Command Failed: [
#{
ent
[
:command
]
}
]"
end
wait_process
while
$rake_fiber_table
.
size
>=
$rake_jobs
fail
'task scheduling bug!'
if
$rake_fiber_table
.
size
>=
$rake_jobs
ent
[
:fiber
].
transfer
end
wait_process
(
count
+
1
)
if
!
$rake_fiber_table
.
empty?
&&
exited
.
empty?
end
end
...
...
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