Skip to content

Instantly share code, notes, and snippets.

Annuradha annrayc

Block or report user

Report or block annrayc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View concurrency.md

Concurrency: the reason we're here

A bit of background

In Elixir, all code runs inside processes. Processes are isolated from each other, run concurrent to one another and communicate via message passing. Processes are not only the basis for concurrency in Elixir, but they also provide the means for building distributed and fault-tolerant programs.

Elixir’s processes should not be confused with operating system processes. Processes in Elixir are extremely lightweight in terms of memory and CPU (unlike threads in many other programming languages). Because of this, it is not uncommon to have tens or even hundreds of thousands of processes running simultaneously.

Processes

The most basic mechanism for creating processes is using the spawn/1 function:

@annrayc
annrayc / capybara cheat sheet
Last active Aug 29, 2015 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
View capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
You can’t perform that action at this time.