import asyncio
import threading


def ask(q):
    async def put_to_q(q, elem):
        await q.put(elem)

    while True:
        res = input('Enter data: ')
        asyncio.run(put_to_q(q, res))


async def produce(q):
    while True:
        elem = await q.get()
        print(f'Processing {elem} ...')
        await asyncio.sleep(3)
        print(f'{elem} done')


async def main():
    queue = asyncio.Queue()
    print('Main started')
    t = threading.Thread(target=lambda: ask(queue))
    t.start()
    await produce(queue)


if __name__ == '__main__':
    asyncio.run(main())