4 ms·
Load the module: https://hexdocs.pm/gleam_otp/gleam/otp/task.html https://hexdocs.pm/gleam_otp/gleam/otp/task.html import gleam/otp/task How modules work i
by cess11 2y ago
Load the module: https://hexdocs.pm/gleam_otp/gleam/otp/task.html https://hexdocs.pm/gleam_otp/gleam/otp/task.html
import gleam/otp/task
How modules work is covered by the language tour, and to do something interesting you'll probably want more than just the task module. The concurrency stuff isn't as fleshed out in Gleam as it is in Elixir or Erlang, as I understand it because it's not the project's focus and due to how the type system works.
- lawn 2y agoI think I've heard that it's implemented as a library because we're not sure about the best way to implement the concurrency stuff. It's easier to experiment in a library than in the core.
- cess11 2y agoRight, yeah, maybe I read that it's something like the typing system putting constraints on direct interop, I'm not sure. I mostly follow from the sidelines, having a deeper buyin with Elixir, but whenever I find the time and a use case I'll build something in Gleam and learn more.