mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2026-05-06 09:28:18 +00:00
Tweak tweak
This commit is contained in:
@@ -13,13 +13,23 @@ require_relative "lib/worker"
|
||||
require_relative "lib/worker/api"
|
||||
|
||||
module W3DHubLauncher
|
||||
WORKER = Ractor.new { W3DHubLauncher::Worker.new }
|
||||
WORKER = Ractor.new(name: "Parallel Worker") { W3DHubLauncher::Worker.new }
|
||||
end
|
||||
|
||||
W3DHubLauncher::WORKER.send({ type: :fetch, cache: true, uri: "https://github.com" })
|
||||
# Hello, I exist because there presently exists no way to ask if there are pending
|
||||
# messages in our ractors mailbox without making a blocking call which is a big no no
|
||||
# for a GUI application. :|
|
||||
#
|
||||
# Keep an eye on: https://bugs.ruby-lang.org/issues/21930: "Add Ractor#empty? method to check for pending messages without blocking"
|
||||
#
|
||||
# NOTE: May need to mangle Window#update to do ruby-land sleep so thread gets time to process :(
|
||||
Thread.new do
|
||||
loop do
|
||||
message = Ractor.receive
|
||||
pp message
|
||||
end
|
||||
end
|
||||
|
||||
# window = W3DHubLauncher::Window.new(width: 1280, height: 800, resizable: true)
|
||||
window = W3DHubLauncher::Window.new(width: 1920, height: 1080, resizable: true)
|
||||
window = W3DHubLauncher::Window.new(width: 1280, height: 800, resizable: true)
|
||||
# window = W3DHubLauncher::Window.new(width: 1920, height: 1080, resizable: true)
|
||||
window.show
|
||||
|
||||
puts "HELO"
|
||||
|
||||
Reference in New Issue
Block a user