I have the following code in my rails application.
def fetch_data
data = []
threads = []
threads << Thread.new do
::KcmoDatasets::Fake.new
end
threads.map(&:join)
return data
end
module KcmoDatasets
class Fake
def initialize
end
end
end
The fake class is located in lib/kcmo_datasets/fake.rb, and the fetch_data method is inside a service object of app/services/data_fetcher.rb.
When I run the join command, the application appears to just hang. Anyone else have this issue?