Process the entire queue while taking periodic breaks. This allows the game loop to run smoothly. The queue contains calls to _show_block() and _hide_block() so this method should be called if add_block() or remove_block() was called with immediate=False
(self)
| 413 | func(*args) |
| 414 | |
| 415 | def process_queue(self): |
| 416 | """ Process the entire queue while taking periodic breaks. This allows |
| 417 | the game loop to run smoothly. The queue contains calls to |
| 418 | _show_block() and _hide_block() so this method should be called if |
| 419 | add_block() or remove_block() was called with immediate=False |
| 420 | |
| 421 | """ |
| 422 | start = time.perf_counter() |
| 423 | while self.queue and time.perf_counter() - start < 1.0 / TICKS_PER_SEC: |
| 424 | self._dequeue() |
| 425 | |
| 426 | def process_entire_queue(self): |
| 427 | """ Process the entire queue with no breaks. |