mirror of
https://github.com/TimeCrafters/timecrafters_configuration_tool_desktop.git
synced 2025-12-16 13:52:34 +00:00
Fixed some issues related to threading in game clock by using a queue
This commit is contained in:
@@ -1,12 +1,19 @@
|
||||
module TAC
|
||||
class PracticeGameClock
|
||||
class RemoteProxy
|
||||
attr_reader :queue
|
||||
|
||||
def initialize(window)
|
||||
@window = window
|
||||
|
||||
@queue = []
|
||||
@callbacks = {}
|
||||
end
|
||||
|
||||
def enqueue(&block)
|
||||
@queue << block
|
||||
end
|
||||
|
||||
def register(callback, method)
|
||||
@callbacks[callback] = method
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user