MCPcopy Create free account
hub / github.com/TheLastBen/fast-stable-diffusion / block_thread

Method block_thread

Dreambooth/blocks.py:1550–1559  ·  view source on GitHub ↗

Block main thread until interrupted by user.

(
        self,
    )

Source from the content-addressed store, hash-verified

1548 pass
1549
1550 def block_thread(
1551 self,
1552 ) -> None:
1553 """Block main thread until interrupted by user."""
1554 try:
1555 while True:
1556 time.sleep(0.1)
1557 except (KeyboardInterrupt, OSError):
1558 print("Keyboard interruption in main thread... closing server.")
1559 self.server.close()
1560
1561 def attach_load_events(self):
1562 """Add a load event for every component whose initial value should be randomized."""

Callers 1

launchMethod · 0.95

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected