How to start next stream only after finishing stream before?

In my code:

stream= File.stream!(path)
    |> CSVParser.parse_stream
    |> Stream.map(fn row -> row end)
    |> Stream.chunk(chunck_n, step, [])
    |> Task.async_stream(MyApp.CsvsController, :chunk_handler_fn, [process_name, db_map, entity_name, entity_id, table_name])

How would I change it so that streams wait each other? (avoid concurrency )

You could simply use Enum.map/2 instead of Task.async_stream/4. Like this, only one of your Stream elements will be processed at a time.