create account

Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs) by tensor

View this thread on: hive.blogpeakd.comecency.com
· @tensor · (edited)
$67.57
Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)
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*
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 42 others
properties (23)
authortensor
permlinkintro-to-rust-concurrency-threads-channels-mutexs-and-arcs
categorytechnology
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"}
created2017-12-17 04:15:39
last_update2017-12-17 04:17:48
depth0
children11
last_payout2017-12-24 04:15:39
cashout_time1969-12-31 23:59:59
total_payout_value51.497 HBD
curator_payout_value16.070 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,779
author_reputation87,856,203,149,624
root_title"Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,830,991
net_rshares10,441,965,390,242
author_curate_reward""
vote details (106)
@five34a4b ·
intro-to-rust-concurrency-threads-channels-mutexs-and-arcs-comment
great content!
properties (22)
authorfive34a4b
permlinkintro-to-rust-concurrency-threads-channels-mutexs-and-arcs-comment
categorytechnology
json_metadata{}
created2017-12-17 21:37:21
last_update2017-12-17 21:37:21
depth1
children2
last_payout2017-12-24 21:37:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length14
author_reputation1,119,681,610,239
root_title"Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,933,028
net_rshares0
@resteemsupport ·
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)
properties (22)
authorresteemsupport
permlinkre-intro-to-rust-concurrency-threads-channels-mutexs-and-arcs-comment-20171217t215315
categorytechnology
json_metadata""
created2017-12-17 21:53:15
last_update2017-12-17 21:53:15
depth2
children0
last_payout2017-12-24 21:53:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length275
author_reputation-6,530,562,082,764
root_title"Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,934,393
net_rshares0
@tensor ·
Thank you, I am glad you enjoyed it.
properties (22)
authortensor
permlinkre-five34a4b-intro-to-rust-concurrency-threads-channels-mutexs-and-arcs-comment-20171217t214505204z
categorytechnology
json_metadata{"tags":["technology"],"app":"steemit/0.1"}
created2017-12-17 21:45:03
last_update2017-12-17 21:45:03
depth2
children0
last_payout2017-12-24 21:45:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length36
author_reputation87,856,203,149,624
root_title"Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,933,688
net_rshares0
@joseferrer ·
excellent post I love greetings and I follow you.
properties (22)
authorjoseferrer
permlinkre-tensor-intro-to-rust-concurrency-threads-channels-mutexs-and-arcs-20171217t153048424z
categorytechnology
json_metadata{"tags":["technology"],"app":"steemit/0.1"}
created2017-12-17 15:30:54
last_update2017-12-17 15:30:54
depth1
children2
last_payout2017-12-24 15:30:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length49
author_reputation-56,563,599,716
root_title"Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,893,459
net_rshares0
@tensor ·
I'm glad you enjoyed them.  Thank you for the feedback.
properties (22)
authortensor
permlinkre-joseferrer-re-tensor-intro-to-rust-concurrency-threads-channels-mutexs-and-arcs-20171217t173120393z
categorytechnology
json_metadata{"tags":["technology"],"app":"steemit/0.1"}
created2017-12-17 17:31:18
last_update2017-12-17 17:31:18
depth2
children1
last_payout2017-12-24 17:31:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length55
author_reputation87,856,203,149,624
root_title"Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,907,722
net_rshares0
@joseferrer ·
a pleasure, I hope you can see my profile thanks I follow you .
properties (22)
authorjoseferrer
permlinkre-tensor-re-joseferrer-re-tensor-intro-to-rust-concurrency-threads-channels-mutexs-and-arcs-20171217t185226534z
categorytechnology
json_metadata{"tags":["technology"],"app":"steemit/0.1"}
created2017-12-17 18:52:33
last_update2017-12-17 18:52:33
depth3
children0
last_payout2017-12-24 18:52:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length63
author_reputation-56,563,599,716
root_title"Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,916,974
net_rshares0
@minnowpowerup ·
@MinnowPowerUp summary from December 18, 2017
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
properties (22)
authorminnowpowerup
permlinkre-intro-to-rust-concurrency-threads-channels-mutexs-and-arcs-20171218t150855
categorytechnology
json_metadata"{"app": "pysteem/0.5.4"}"
created2017-12-18 15:08:54
last_update2017-12-18 15:08:54
depth1
children0
last_payout2017-12-25 15:08:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length360
author_reputation5,690,564,233,955
root_title"Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id24,036,759
net_rshares0
@steemitboard ·
Congratulations @tensor! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

[![](https://steemitimages.com/70x80/http://steemitboard.com/notifications/votes.png)](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)!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-tensor-20171218t094306000z
categorytechnology
json_metadata{"image":["https://steemitboard.com/img/notifications.png"]}
created2017-12-18 09:43:06
last_update2017-12-18 09:43:06
depth1
children0
last_payout2017-12-25 09:43:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length682
author_reputation38,975,615,169,260
root_title"Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,997,836
net_rshares0
@superoo7 ·
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!
👍  
properties (23)
authorsuperoo7
permlinkre-tensor-intro-to-rust-concurrency-threads-channels-mutexs-and-arcs-20171219t115540835z
categorytechnology
json_metadata{"tags":["technology"],"app":"steemit/0.1"}
created2017-12-19 11:55:39
last_update2017-12-19 11:55:39
depth1
children0
last_payout2017-12-26 11:55:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length132
author_reputation27,763,618,634,121
root_title"Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id24,174,132
net_rshares528,030,230
author_curate_reward""
vote details (1)
@tensor ·
@originalworks
properties (22)
authortensor
permlinkre-tensor-intro-to-rust-concurrency-threads-channels-mutexs-and-arcs-20171217t053036653z
categorytechnology
json_metadata{"tags":["technology"],"users":["originalworks"],"app":"steemit/0.1"}
created2017-12-17 05:30:33
last_update2017-12-17 05:30:33
depth1
children1
last_payout2017-12-24 05:30:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length14
author_reputation87,856,203,149,624
root_title"Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,836,881
net_rshares0
@originalworks ·
originalworks
The @OriginalWorks bot has determined this post by @tensor to be original material and upvoted(1.5%) it! 
<center>![ezgif.com-resize.gif](https://steemitimages.com/DQmaBi37A5oTnQ9NBLH8YU4jpvhhmFauyvgg3YRrEJwskM9/ezgif.com-resize.gif)</center> 

To call @OriginalWorks, simply reply to any post with @originalworks or !originalworks in your message!
properties (22)
authororiginalworks
permlinkre-re-tensor-intro-to-rust-concurrency-threads-channels-mutexs-and-arcs-20171217t053036653z-20171217t053138
categorytechnology
json_metadata"{"app": "pysteem/0.5.4"}"
created2017-12-17 05:31:39
last_update2017-12-17 05:31:39
depth2
children0
last_payout2017-12-24 05:31:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length348
author_reputation79,292,026,602,057
root_title"Intro to Rust (Concurrency, Threads, Channels, Mutexs and Arcs)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,836,968
net_rshares0