Я, как старый разработчик, обычно в расте использовал только стандартные примитивы синхронизации - Mutex, RwLock, Atomic* и т.п.
Но недавно попробовал #Rayon, и изумился насколько просто сделать распараллеливание обработки данных.
Просто запускаешь параллельный итератор по коллекции, и собираешь результат в другую коллекцию.
Но есть и подводные - нельзя просто в замыкание закинуть коллекцию для результатов, например.
@Kuchenschwarte
Madeira #Rayon
Das Viskosegarn....
Ehrlich: Mit meinem Laienhaften Auge sehe ich absolut keinen Unterschied zum #PolySheen oder #PolyNeon
Für mich ist der Glanz annähernd identisch. Im Gegensatz zu Polyestergarn auch hier wieder bis 95°C waschbar, bei *** bügelbar.
Zur Haltbarkeit auf dem Stoff, während man es im Alltag gebraucht, kann ich natürlich nix sagen.
Wenn sich das Zeug bewährt, flieg Polysheen bei mir raus.
#Stickgarn #Maschinenstickgarn
#rayon #polysheen #polyneon #stickgarn #maschinenstickgarn
@Kuchenschwarte
Madeira #Rayon
Das Viskosegarn....
Ehrlich: Mit meinem Laienhaften Auge sehe ich absolut keinen Unterschied zum #PolySheen oder #PolyNeon
Für mich ist der Glanz annähernd identisch. Im Gegensatz zu Polyestergarn auch hier wieder bis 95°C waschbar, bei *** bügelbar.
Zur Haltbarkeit auf dem Stoff, während man es im Alltag gebraucht, kann ich natürlich nix sagen.
Wenn sich das Zeug bewährt, flieg Polysheen bei mir raus.
#Stickgarn #Maschinenstickgarn
#rayon #polysheen #polyneon #stickgarn #maschinenstickgarn
@smranaldi Update after 50 days:
I did my first big project with scientific computations in #RustLang. I did use #egui which fits perfectly for simulations with live plots.
#rayon is a must for load balanced multithreading. Multithreading in general is fearless with the type system with Arc, Mutex, atomics, channels etc. (unless you produce a deadlock).
I loved #indicatif for threadsafe progressbars for my long simulations. 100% CPU usage with fancy progressbars, I love it!
1/4
#rustlang #egui #rayon #indicatif
😯
---
RT @centaurclub
La planche 01 de la #flecheardente la suite du mythique #rayon de #epjacobs
Scénario : Jean #vanhamme
dessins : Christian #cailleaux & Etienne #schreder
Couleurs : Bruno #tatti
La 2eme planche est visible sur le forum :
https://www.centaurclub.com/forum/viewtopic.php?f=170&t=4099
https://twitter.com/centaurclub/status/1614373422687195136
#flecheardente #rayon #epjacobs #VanHamme #cailleaux #schreder #tatti
Grupo de liberación electrónica... Suena interesante.
Grupo de liberación electrónica... Suena interesante.
@TimoBetcke If you do decide to use #rayon, you can get access to the #tokio context from a rayon thread by passing a tokio handle into the rayon task.
let handle = tokio::Handle::current();
rayon::spawn(move || {
handle.block_on(async move {
// Async code here
});
});
This'll work for std::thread::spawn too.
19 septembre 2022
Coup de lumière
Et la pierre se vit
Autrement
D'où vient le rayon
Qui t'éclaire joliment ?
#photodujour #journalphoto #defi #quotidien #artiste #photographe #pictureoftheday #photodiary #challenge #artist #photographer #lumiere #soleilcouchant #soir #rayon #soleil #mur #pierre #light #sunset #evening #sun #sunray #sunshine #wall #stone #photo
#photo #stone #wall #sunshine #sunray #sun #evening #sunset #light #pierre #mur #soleil #rayon #soir #soleilcouchant #lumiere #photographer #artist #challenge #photodiary #pictureoftheday #photographe #artiste #quotidien #defi #journalphoto #photodujour
10 juillet 2022
Méduses de plastique
#photodujour #journalphoto #defi #quotidien #artiste #photographe #pictureoftheday #photodiary #challenge #artist #photographer #lunettes #masque #piscine #eau #soleil #reflet #rayon #glasses #mask #swimmingpool #water #sun #reflection #photo
#photo #reflection #sun #water #swimmingpool #mask #glasses #rayon #reflet #soleil #eau #piscine #masque #lunettes #photographer #artist #challenge #photodiary #pictureoftheday #photographe #artiste #quotidien #defi #journalphoto #photodujour
#Rust might be a newer, younger language, with fewer idiomatic libraries available (backed up by literally 0 evidence), but the libraries and existing code is just ... so cool! From #Serde, to #Indicatif, to #Rayon, to many, many more, (ok I've been reading too much fasterthanli.me), it's just all so ... surprisingly easy. I particularly like how crates can add additional functionality to parts of the Standard Library, or even some of the core data structures and types of the language.
#rayon #Indicatif #serde #rust
#RustLang Code Analysis: #Servo, #TiKV, Parity Ethereum, #Redox, #Tock, Rand, #Crossbeam, Threadpool, #Rayon, #Lazy_static
#rustlang #servo #TiKV #redox #tock #crossbeam #rayon #Lazy_static