Re:Rust: Dropping heavy things in another thread can make yo...
by tedunangst on Saturday May 30, 2020 @01:48PM
(#23363058)
It would be helpful to see an example from a real application, too.
Re:Rust: Dropping heavy things in another thread can make yo...
by masklinn on Saturday May 30, 2020 @03:19PM
(#23363836)
A very large Vec<String> (say a few million non-empty strings) would do I'd guess, Rust would drop the Vec which would recursively drop each String.
Re:Rust: Dropping heavy things in another thread can make yo...
by burpsnard on Saturday May 30, 2020 @07:57PM
(#23365948)
I start thinking about c++ 'placement new' and COBOL copy record structures.
And aquire/release objects from resource pools that manage themselves. And message queue handlers. And pass-by-reference, and object pools..
As you note that will certainly add some overhead, although that could be minimized by not spawning a fresh thread each time. It could easily reduce latency for a thread the UI is waiting on in many cases.