Rust's approach to concurrency is rather interesting and it has evolved drastically over the years. Originally, the language had a full system of _Procs_ and _Workers_ with _Actors_ and a _co-routine_ style system similar to Go. These days Rust takes some of the best ideas from famous distributed languages like Go and Elixir such as __Channels__ and adds in some of the more standard ideas from languages like C++ and Java in the form of the __Mutex__ and the __Arc__. Keeping things relatively simple and abstraction free helps Rust have a fairly low runtime overhead which is important for a systems level programming language. You can include libraries that do implement other concurrency models such as *Isolates*, *Actors* and *Co-Routines* but Rust stays less opinionated on its concurrency model for the sake of keeping things trimmed down and smooth. Ultimately, the result is a system that can seem a bit rough around the edges and superlative until you consider the implications of the Rust *ownership* model, Rust's strong typing system and it's very helpful compiler. In this video we look at the surface level standard library mechanisms of the Mutex, Arc, Channel and the OS Thread and we use them to create *multi-threaded* programs. <iframe width="560" height="315" src="https://www.youtube.com/embed/_4fSLuvPMf8" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe> *If you enjoy the video, feel free to follow me on Steemit or on YouTube to get updates on the channel as well as more content.* *If you like what I do, tips and upvotes are welcome:* *ETH: 0xE448a8DDA5886C49d35B191B2F20630c103024c8* *LTC: LXsKxF5JhmMtKgqfcUFdvcXVwiaSqxN9cP* *Also, feel free to check out my channel for videos on Go, Elixir and Elm*
author | tensor |
---|---|
permlink | intro-to-rust-concurrency-threads-channels-mutexs-and-arcs |
category | technology |
json_metadata | {"tags":["technology","steemstem","science","programming","utopian-io"],"image":["https://img.youtube.com/vi/_4fSLuvPMf8/0.jpg"],"links":["https://www.youtube.com/embed/_4fSLuvPMf8"],"app":"steemit/0.1","format":"markdown"} |
created | 2017-12-17 04:15:39 |
last_update | 2017-12-17 04:17:48 |
depth | 0 |
children | 11 |
last_payout | 2017-12-24 04:15:39 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 51.497 HBD |
curator_payout_value | 16.070 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,779 |
author_reputation | 87,856,203,149,624 |
root_title | "Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,830,991 |
net_rshares | 10,441,965,390,242 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
fminerten | 0 | 189,187,702,365 | 5% | ||
steempty | 0 | 135,875,382,591 | 5% | ||
pharesim | 0 | 106,186,526,248 | 0.15% | ||
lafona-miner | 0 | 606,241,889,768 | 20% | ||
kushed | 0 | 94,312,249,889 | 6% | ||
xeroc | 0 | 1,766,464,124 | 1.8% | ||
steem-id | 0 | 19,345,550,990 | 1.8% | ||
bue | 0 | 13,770,951,492 | 100% | ||
blakemiles84 | 0 | 8,690,930,749 | 1.8% | ||
justtryme90 | 0 | 873,825,728,148 | 34% | ||
samether | 0 | 111,466,091 | 1.8% | ||
anwenbaumeister | 0 | 140,257,654,458 | 6% | ||
phenom | 0 | 1,629,681,124 | 1.8% | ||
liberosist | 0 | 331,014,567,859 | 6% | ||
steemdrive | 0 | 215,447,029,301 | 15% | ||
gomeravibz | 0 | 1,997,567,108 | 0.72% | ||
cryptoninja | 0 | 255,062,447 | 4% | ||
toxichan | 0 | 1,485,135,188 | 6% | ||
timsaid | 0 | 23,253,926,107 | 8% | ||
kyriacos | 0 | 83,250,011,862 | 20% | ||
lemouth | 0 | 101,800,739,573 | 40% | ||
rjbauer85 | 0 | 1,279,418,810 | 40% | ||
lamouthe | 0 | 4,846,249,823 | 40% | ||
dan-bn | 0 | 9,056,014,061 | 1.8% | ||
funnyman | 0 | 4,013,424,752 | 0.6% | ||
steemedia | 0 | 639,957,011 | 6% | ||
meerkat | 0 | 57,608,067,713 | 6% | ||
donchate | 0 | 459,387,976 | 7% | ||
saiku | 0 | 1,053,024,049 | 7% | ||
curie | 0 | 302,744,896,657 | 6% | ||
cebymaster | 0 | 794,046,552 | 6% | ||
trueart | 0 | 1,105,875,512 | 7% | ||
techslut | 0 | 122,681,082,229 | 10% | ||
hendrikdegrote | 0 | 3,242,035,300,154 | 6% | ||
steemstem | 0 | 413,737,533,877 | 40% | ||
oleg326756 | 0 | 500,250,305 | 0.6% | ||
cotidiana | 0 | 712,463,247 | 6% | ||
foundation | 0 | 3,429,307,677 | 40% | ||
vcelier | 0 | 83,630,446,605 | 1.2% | ||
the-devil | 0 | 8,618,359,563 | 40% | ||
dna-replication | 0 | 8,160,435,851 | 30% | ||
vidallia | 0 | 16,520,040,403 | 100% | ||
pacokam8 | 0 | 139,343,168 | 1.2% | ||
jamhuery | 0 | 17,458,619,509 | 40% | ||
jhagi.bhai | 0 | 182,875,765 | 0.6% | ||
kingyus | 0 | 114,685,275 | 5% | ||
papadimos | 0 | 8,712,243,050 | 40% | ||
mobbs | 0 | 26,747,334,265 | 20% | ||
bp423 | 0 | 1,640,415,425 | 6% | ||
oscarcc89 | 0 | 101,522,720 | 0.6% | ||
kryzsec | 0 | 7,228,908,509 | 40% | ||
kenchung | 0 | 3,427,710,604 | 8% | ||
leader5050 | 0 | 583,458,580 | 100% | ||
arrliinn | 0 | 1,624,646,043 | 6% | ||
robertvogt | 0 | 270,758,288 | 0.6% | ||
diggerdugg | 0 | 575,361,496 | 6% | ||
dber | 0 | 34,606,449,409 | 40% | ||
derosnec | 0 | 145,432,734 | 1.2% | ||
kerriknox | 0 | 139,731,527,781 | 40% | ||
alexander.alexis | 0 | 1,358,578,619 | 8% | ||
sieses | 0 | 647,760,521 | 6% | ||
tensor | 0 | 8,027,931,354 | 100% | ||
erangvee | 0 | 4,035,080,127 | 6% | ||
rockeynayak | 0 | 249,984,506 | 40% | ||
ted7 | 0 | 67,727,841 | 6% | ||
nitesh9 | 0 | 8,615,058,747 | 40% | ||
dante31 | 0 | 221,952,403 | 6% | ||
himal | 0 | 1,862,743,873 | 40% | ||
ratticus | 0 | 977,742,476 | 4.8% | ||
ovij | 0 | 6,518,826,562 | 40% | ||
kharrazi | 0 | 29,680,760,533 | 40% | ||
azirgraff | 0 | 23,330,096,995 | 24% | ||
horpey | 0 | 306,404,886 | 6% | ||
somethingburger | 0 | 2,603,630,024 | 40% | ||
tanyaschutte | 0 | 4,664,434,261 | 40% | ||
pearlumie | 0 | 9,638,783,644 | 40% | ||
originalworks | 0 | 5,264,867,774 | 1.5% | ||
webresultat | 0 | 543,397,932 | 6% | ||
blogtrovert | 0 | 64,898,798 | 6% | ||
minnowpowerup | 0 | 43,731,518,390 | 5.61% | ||
imamalkimas | 0 | 1,944,211,090 | 40% | ||
opaulo | 0 | 35,915,108,426 | 7% | ||
mirahu | 0 | 537,659,427 | 100% | ||
rachelsmantra | 0 | 1,982,381,300 | 40% | ||
anadolu | 0 | 22,249,043,717 | 5% | ||
gra | 0 | 13,521,075,927 | 40% | ||
kedi | 0 | 10,072,004,405 | 40% | ||
sci-guy | 0 | 100,145,293 | 40% | ||
rayhanahmed | 0 | 683,147,212 | 100% | ||
jasimg | 0 | 8,919,862,950 | 6% | ||
mindhacks | 0 | 1,532,206,142 | 40% | ||
robertlyon | 0 | 6,219,233,784 | 100% | ||
usg | 0 | 427,647,400 | 100% | ||
raci | 0 | 421,710,694 | 6% | ||
ongoingwow | 0 | 1,560,827,749 | 32% | ||
amavi | 0 | 4,652,012,770 | 8% | ||
geekpowered | 0 | 15,878,808,611 | 8% | ||
gentleshaid | 0 | 8,277,789,158 | 40% | ||
rantar | 0 | 4,982,764,787 | 100% | ||
jhafso | 0 | 547,634,800 | 100% | ||
grumpycat | 0 | 2,666,959,235,849 | 14% | ||
thetruedm | 0 | 2,215,764,235 | 100% | ||
codeworkr | 0 | 980,872,581 | 100% | ||
opticcncfan | 0 | 287,115,958 | 100% | ||
steemstem-bot | 0 | 1,394,561,831 | 100% | ||
superoo7 | 0 | 667,290,950 | 100% |
great content!
author | five34a4b |
---|---|
permlink | intro-to-rust-concurrency-threads-channels-mutexs-and-arcs-comment |
category | technology |
json_metadata | {} |
created | 2017-12-17 21:37:21 |
last_update | 2017-12-17 21:37:21 |
depth | 1 |
children | 2 |
last_payout | 2017-12-24 21:37:21 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 14 |
author_reputation | 1,119,681,610,239 |
root_title | "Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,933,028 |
net_rshares | 0 |
Congratulations! This post has been randomly Resteemed! To join the ResteemSupport network and be entered into the lottery please upvote this post and [see the following rules.](https://steemit.com/introduceyourself/@resteemsupport/resteem-support-get-your-content-resteemed)
author | resteemsupport |
---|---|
permlink | re-intro-to-rust-concurrency-threads-channels-mutexs-and-arcs-comment-20171217t215315 |
category | technology |
json_metadata | "" |
created | 2017-12-17 21:53:15 |
last_update | 2017-12-17 21:53:15 |
depth | 2 |
children | 0 |
last_payout | 2017-12-24 21:53:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 275 |
author_reputation | -6,530,562,082,764 |
root_title | "Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,934,393 |
net_rshares | 0 |
Thank you, I am glad you enjoyed it.
author | tensor |
---|---|
permlink | re-five34a4b-intro-to-rust-concurrency-threads-channels-mutexs-and-arcs-comment-20171217t214505204z |
category | technology |
json_metadata | {"tags":["technology"],"app":"steemit/0.1"} |
created | 2017-12-17 21:45:03 |
last_update | 2017-12-17 21:45:03 |
depth | 2 |
children | 0 |
last_payout | 2017-12-24 21:45:03 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 36 |
author_reputation | 87,856,203,149,624 |
root_title | "Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,933,688 |
net_rshares | 0 |
excellent post I love greetings and I follow you.
author | joseferrer |
---|---|
permlink | re-tensor-intro-to-rust-concurrency-threads-channels-mutexs-and-arcs-20171217t153048424z |
category | technology |
json_metadata | {"tags":["technology"],"app":"steemit/0.1"} |
created | 2017-12-17 15:30:54 |
last_update | 2017-12-17 15:30:54 |
depth | 1 |
children | 2 |
last_payout | 2017-12-24 15:30:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 49 |
author_reputation | -56,563,599,716 |
root_title | "Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,893,459 |
net_rshares | 0 |
I'm glad you enjoyed them. Thank you for the feedback.
author | tensor |
---|---|
permlink | re-joseferrer-re-tensor-intro-to-rust-concurrency-threads-channels-mutexs-and-arcs-20171217t173120393z |
category | technology |
json_metadata | {"tags":["technology"],"app":"steemit/0.1"} |
created | 2017-12-17 17:31:18 |
last_update | 2017-12-17 17:31:18 |
depth | 2 |
children | 1 |
last_payout | 2017-12-24 17:31:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 55 |
author_reputation | 87,856,203,149,624 |
root_title | "Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,907,722 |
net_rshares | 0 |
a pleasure, I hope you can see my profile thanks I follow you .
author | joseferrer |
---|---|
permlink | re-tensor-re-joseferrer-re-tensor-intro-to-rust-concurrency-threads-channels-mutexs-and-arcs-20171217t185226534z |
category | technology |
json_metadata | {"tags":["technology"],"app":"steemit/0.1"} |
created | 2017-12-17 18:52:33 |
last_update | 2017-12-17 18:52:33 |
depth | 3 |
children | 0 |
last_payout | 2017-12-24 18:52:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 63 |
author_reputation | -56,563,599,716 |
root_title | "Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,916,974 |
net_rshares | 0 |
You have collected your daily Power Up! This post received an upvote worth of 0.19$. [Learn how to Power Up Smart here!](https://steemit.com/steemit/@minnowpowerup/introducing-minnowpowerup-a-paid-subscription-based-daily-upvote-bot-that-draws-its-power-from-a-delegation-pool) https://steemitimages.com/DQmQxdQrRLJQjMQFKJgGLQT8tnub5SogfuvUNmkmNyqLrbd/logo.png
author | minnowpowerup |
---|---|
permlink | re-intro-to-rust-concurrency-threads-channels-mutexs-and-arcs-20171218t150855 |
category | technology |
json_metadata | "{"app": "pysteem/0.5.4"}" |
created | 2017-12-18 15:08:54 |
last_update | 2017-12-18 15:08:54 |
depth | 1 |
children | 0 |
last_payout | 2017-12-25 15:08:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 360 |
author_reputation | 5,690,564,233,955 |
root_title | "Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 24,036,759 |
net_rshares | 0 |
Congratulations @tensor! You have completed some achievement on Steemit and have been rewarded with new badge(s) : [](http://steemitboard.com/@tensor) Award for the number of upvotes Click on any badge to view your own Board of Honor on SteemitBoard. For more information about SteemitBoard, click [here](https://steemit.com/@steemitboard) If you no longer want to receive notifications, reply to this comment with the word `STOP` > By upvoting this notification, you can help all Steemit users. Learn how [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!
author | steemitboard |
---|---|
permlink | steemitboard-notify-tensor-20171218t094306000z |
category | technology |
json_metadata | {"image":["https://steemitboard.com/img/notifications.png"]} |
created | 2017-12-18 09:43:06 |
last_update | 2017-12-18 09:43:06 |
depth | 1 |
children | 0 |
last_payout | 2017-12-25 09:43:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 682 |
author_reputation | 38,975,615,169,260 |
root_title | "Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,997,836 |
net_rshares | 0 |
I am being amazed on all the great work you had done on youtube channel with Elixir, Elm, Rust and Go. Definitely subscribed to you!
author | superoo7 |
---|---|
permlink | re-tensor-intro-to-rust-concurrency-threads-channels-mutexs-and-arcs-20171219t115540835z |
category | technology |
json_metadata | {"tags":["technology"],"app":"steemit/0.1"} |
created | 2017-12-19 11:55:39 |
last_update | 2017-12-19 11:55:39 |
depth | 1 |
children | 0 |
last_payout | 2017-12-26 11:55:39 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 132 |
author_reputation | 27,763,618,634,121 |
root_title | "Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 24,174,132 |
net_rshares | 528,030,230 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
superoo7 | 0 | 528,030,230 | 100% |
@originalworks
author | tensor |
---|---|
permlink | re-tensor-intro-to-rust-concurrency-threads-channels-mutexs-and-arcs-20171217t053036653z |
category | technology |
json_metadata | {"tags":["technology"],"users":["originalworks"],"app":"steemit/0.1"} |
created | 2017-12-17 05:30:33 |
last_update | 2017-12-17 05:30:33 |
depth | 1 |
children | 1 |
last_payout | 2017-12-24 05:30:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 14 |
author_reputation | 87,856,203,149,624 |
root_title | "Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,836,881 |
net_rshares | 0 |
The @OriginalWorks bot has determined this post by @tensor to be original material and upvoted(1.5%) it! <center></center> To call @OriginalWorks, simply reply to any post with @originalworks or !originalworks in your message!
author | originalworks |
---|---|
permlink | re-re-tensor-intro-to-rust-concurrency-threads-channels-mutexs-and-arcs-20171217t053036653z-20171217t053138 |
category | technology |
json_metadata | "{"app": "pysteem/0.5.4"}" |
created | 2017-12-17 05:31:39 |
last_update | 2017-12-17 05:31:39 |
depth | 2 |
children | 0 |
last_payout | 2017-12-24 05:31:39 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 348 |
author_reputation | 79,292,026,602,057 |
root_title | "Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,836,968 |
net_rshares | 0 |