You can run functions in parallel without any problems as long as you have enough memory in your computer and none of your functions are dependent on one another. Think about how quickly you can complete your cron jobs now!
def func1
i = 0
while i <= 5
puts "func1 at: #{Time.now}"
sleep(2)
i = i + 1
end
end
def func2
i = 0
while i <= 5
puts "func2 at: #{Time.now}"
sleep(1)
i = i + 1
end
end
puts "Start at: #{Time.now}"
t1 = Thread.new{func1()}
t2 = Thread.new{func2()}
t1.join
t2.join
puts "End at: #{Time.now}"
Deploying Rails 5.x on AWS ElasticBeanstalk using AWS CodeCommit
How to deploy your Rails app on ElasticBeanstalk (including S3 buckets, security groups, load balancers, auto-scalling groups and more) using CodeCommit.
Subscribe to new posts
Processing your application
Please check your inbox and click the link to confirm your subscription
There was an error sending the email