textual icon indicating copy to clipboard operation
textual copied to clipboard

Devtools doesn't work in spin-loops

Open willmcgugan opened this issue 3 years ago • 1 comments

If the application code is in a spin-loop and not awaiting, then devtools will not receive any logs.

This makes complete sense due to the nature of cooperative multitasking.

I suspect the fix may be to run the websocket client in a thread so that it can run independently of the async loop.

willmcgugan avatar Aug 10 '22 12:08 willmcgugan

I suspect the fix may be to run the websocket client in a thread so that it can run independently of the async loop.

The better fix is to never write any infinite loops 😜

darrenburns avatar Aug 10 '22 12:08 darrenburns

This doesn't seem much of a problem in practice. Closing for now.

willmcgugan avatar Nov 22 '23 15:11 willmcgugan

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

github-actions[bot] avatar Nov 22 '23 15:11 github-actions[bot]