ms68

ms68

What is the indication of async-threads when starting iex?

What is the indication of async-threads when starting iex?
I couldn’t found anything on the web. I have 8 cores on my machine
and when I launch iex, it prints out async-threads:1
Is there a way to manually increase it?

Marked As Solved

dom

dom

Possibly, but what problem are you hitting exactly?

Also Liked

michalmuskala

michalmuskala

Since OTP 21 none of the built-in things use async threads (they migrated to dirty schedulers and dirty NIFs), so it doesn’t make much sense to spawn those threads. There’s still one of them in case you have some custom linked-in port drivers using them.

On previous versions the file ports were using async threads.

Qqwy

Qqwy

TypeCheck Core Team

What is it what you want to do? Not how you suspect to be able to do it, but what itself is the problem you are attempting to solve? (See the XY problem)

dom

dom

System.cmd spawns external processes. They don’t run inside the Erlang VM, so they don’t use async threads.

NobbZ

NobbZ

So what you actually need seems to be some kind of working queue that limits amount of concurrently spawned processes?

Sounds a bit like GenStage or poolboy or… Well, there are plenty, which you need to pick depending on your exact needs.

dom

dom

A quick way to limit how many run in parallel is to use Task.async_stream/5 with its :max_concurrency option. That may be enough if you have only one process kicking off the tasks. Otherwise you could try fancier rate limiting libraries like safetyvalve or jobs.

Where Next?

Popular in Questions Top

srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
chewm
Hi guys, nice to meet you to the whole forum, I’m new here, I’m trying to configure visual studio code for elixir, right now the intellis...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New

Other popular topics Top

srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
273 38985 115
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

We're in Beta

About us Mission Statement