Asyncio error “There is no current event loop in thread” when using with a flask program

Solution
import asyncio
from threading import Thread, current_thread


async def async_job():
    await asyncio.sleep(5)
    print(f"{current_thread().getName()}___Hurray!\n")


def asyncio_wrapper_function():
    try:
        loop = asyncio.get_event_loop()
    except RuntimeError as ex:
        print(ex)
        loop = asyncio.new_event_loop()
    try:
        loop.run_until_complete(async_job())
    finally:
        loop.close()


if __name__ == '__main__':
    ths = [
        Thread(target=asyncio_wrapper_function, name=f"Th-{i}") for i in range(4)
    ]
    [i.start() for i in ths]
    [i.join() for i in ths]

    print("All work done!")