SarkariResultess QA Bank

Async event loop से coroutine run करने का modern तरीका क्या है? — error आने पर developer क्या करे?

Other 0 Views Verified
Async event loop से coroutine run करने का modern तरीका क्या है? — error आने पर developer क्या करे?
Sarkari Result QA Bank
Editorially reviewed exam information

Answer & Explanation

4 Answers
Verified

asyncio.start(main())

asyncio.start(main())
Additional Explanation
यह विकल्प सही समाधान नहीं है।
Verified

async.run_loop(main())

async.run_loop(main())
Additional Explanation
यह विकल्प सही समाधान नहीं है।
Verified Correct Answer

import asyncio asyncio.run(main())

import asyncio asyncio.run(main())
Additional Explanation
asyncio.run() top-level coroutine execute करता है। पहले traceback की exact line और input value check करें।
Verified

loop.run_async(main())

loop.run_async(main())
Additional Explanation
यह विकल्प सही समाधान नहीं है।