import threading
import time
"""
custom made thread class
"""


class AsyncWrite(threading.Thread):
    def __init__(self, text, out):
        threading.Thread.__init__(self)
        self.text = text
        self.out = out

    def run(self):
        with open(self.out, "a") as f:
            f.write(self.text)
        time.sleep(3)
        print(f"finsih background task write to file {self.out}")

0fa830885175248c1c1a818953143d865677aca3
<mask token>


class AsyncWrite(threading.Thread):
    <mask token>
    <mask token>

<mask token>


class AsyncWrite(threading.Thread):
    <mask token>

    def run(self):
        with open(self.out, 'a') as f:
            f.write(self.text)
        time.sleep(3)
        print(f'finsih background task write to file {self.out}')

<mask token>


class AsyncWrite(threading.Thread):

    def __init__(self, text, out):
        threading.Thread.__init__(self)
        self.text = text
        self.out = out

    def run(self):
        with open(self.out, 'a') as f:
            f.write(self.text)
        time.sleep(3)
        print(f'finsih background task write to file {self.out}')

import threading
import time
<mask token>


class AsyncWrite(threading.Thread):

    def __init__(self, text, out):
        threading.Thread.__init__(self)
        self.text = text
        self.out = out

    def run(self):
        with open(self.out, 'a') as f:
            f.write(self.text)
        time.sleep(3)
        print(f'finsih background task write to file {self.out}')

import threading
import time
"""
custom made thread class
"""


class AsyncWrite(threading.Thread):
    def __init__(self, text, out):
        threading.Thread.__init__(self)
        self.text = text
        self.out = out

    def run(self):
        with open(self.out, "a") as f:
            f.write(self.text)
        time.sleep(3)
        print(f"finsih background task write to file {self.out}")
