forked from SilverStudioGames/WTS
19 lines
620 B
Plaintext
19 lines
620 B
Plaintext
init python:
|
|
import threading
|
|
|
|
class DollThread(threading.Thread, NoRollback):
|
|
def __init__(self, group=None, target=None, name=None, args=(), kwargs=None, *, daemon=None):
|
|
threading.Thread.__init__(self, group, target, name, args, kwargs, daemon=daemon)
|
|
|
|
self._return = None
|
|
|
|
def run(self):
|
|
if self._target is not None:
|
|
self._return = self._target(*self._args, **self._kwargs)
|
|
|
|
renpy.restart_interaction()
|
|
|
|
def join(self, timeout=1):
|
|
threading.Thread.join(self, timeout=timeout)
|
|
return self._return
|