Seven Concurrency Models in Seven Weeks : When Threads Unravel (9781680504668) by Butcher Paul
Author:Butcher, Paul
Language: eng
Format: epub
Tags: Pragmatic Bookshelf
ISBN: 978-1-937785-65-9
Publisher: Oreilly & Associates Inc
â send(:cache, {:get, self(), ref, url})
â âreceiveâ âdoâ
â {:ok, ^ref, page} -> page
â âendâ
â âendâ
â âdefâ size âdoâ
â ref = make_ref()
â send(:cache, {:size, self(), ref})
â âreceiveâ âdoâ
â {:ok, ^ref, s} -> s
â âendâ
â âendâ
â
â âdefâ terminate âdoâ
â send(:cache, {:terminate})
â âendâ
The put and terminate functions simply take their arguments, package them up as a tuple, and send them as a message. The get and size methods are slightly more complicated, since they both have to wait for a reply. In this case, they are sending a unique reference using the pattern we saw yesterday.
Hereâs our actor in use:
â iex(1)>â Cache.start_linkâ
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8298)
Azure Data and AI Architect Handbook by Olivier Mertens & Breght Van Baelen(6736)
Building Statistical Models in Python by Huy Hoang Nguyen & Paul N Adams & Stuart J Miller(6713)
Serverless Machine Learning with Amazon Redshift ML by Debu Panda & Phil Bates & Bhanu Pittampally & Sumeet Joshi(6588)
Data Wrangling on AWS by Navnit Shukla | Sankar M | Sam Palani(6371)
Driving Data Quality with Data Contracts by Andrew Jones(6321)
Machine Learning Model Serving Patterns and Best Practices by Md Johirul Islam(6086)
Learning SQL by Alan Beaulieu(5994)
Weapons of Math Destruction by Cathy O'Neil(5779)
Big Data Analysis with Python by Ivan Marin(5362)
Data Engineering with dbt by Roberto Zagni(4359)
Solidity Programming Essentials by Ritesh Modi(4008)
Time Series Analysis with Python Cookbook by Tarek A. Atwan(3866)
Pandas Cookbook by Theodore Petrou(3577)
Blockchain Basics by Daniel Drescher(3294)
Hands-On Machine Learning for Algorithmic Trading by Stefan Jansen(2905)
Feature Store for Machine Learning by Jayanth Kumar M J(2814)
Learn T-SQL Querying by Pam Lahoud & Pedro Lopes(2796)
Mastering Python for Finance by Unknown(2744)
