-
-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor main loop #436
base: main
Are you sure you want to change the base?
Refactor main loop #436
Conversation
@YJDoc2 Here's the WIP branch. It's in its initial prototype stages so please be extra critical =). |
Hey, Thanks for this. I took a quick look, and the new structure with messages seems more clean than the original impl with atomic vars.
Atleast from first look it feels such. Will give more feedback once I'm more familiar.
My personal opinion is async should not be added unless there is a significant benefit or requirement for it. I agree that from just message passing perspective async feels like a sensible choice, but if we could manage by native threads, personally I'd prefer that. My reasoning behind not preferring async we have to add a runtime which can be bulky, and can also run into issues with native multi threading. That said, if you think async is the way to go, I don't have anything against it either. |
Just saying but we have already tokio in the dependencies (for dns resolution)
|
Yeah I agree with basically all that's said here. Switching to async is often just substituting one source of problem with another. That being said, @sigmaSd is correct. We wouldn't be bringing in extra dependencies because it's already here. P.s. It seems like upstream now offers a synchronous API too (although, it's still bandwhich/src/network/dns/resolver.rs Lines 15 to 38 in 6314f1c
|
Main objectives
<UNKNOWN>
; see Electron processes shown as UNKNOWN #196Discussion
async
ecosystem in 2024, should we just usetokio
?