code_junkie

Worker threads in Ruby

Nov 12th, 2011
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. block=Proc.new{ Thread.pass }
  2. timer=Qt::Timer.new(window)
  3. invoke=Qt::BlockInvocation.new(timer, block, "invoke()")
  4. Qt::Object.connect(timer, SIGNAL("timeout()"), invoke, SLOT("invoke()"))
  5. timer.start(1)
Add Comment
Please, Sign In to add comment