Reply to post: Re: On speed

Rust marks five years since its 1.0 release: The long and winding road actually works

bombastic bob Silver badge
Devil

Re: On speed

Messaging is less desirable unless you have a hyper-efficient message queue set up. It can be done, but it would be less ideal than using standard synchronization objects. In some cases, setting up a message polling loop (like you do for Windows old-school programming) is a good idea, but I'd guess that for the vast majority of uses, it's excess overhead and would perform poorly by comparison.

I actually set something up like this in my X11 toolkit, to handle X11 events asynchronously from a queue - I re-prioritized Expose events [for painting] and combined them when possible to speed up draw operations. Also set it up for user-type messages to bypass the X server and be posted directly to the queue - but it's pretty big code and too complex for most cases, yeah. It's not something I'd really want to have to do again, either.

(for IPC a generic messaging system makes sense, but not thread-to-thread.)

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2021