Module rast_coordinator

rast_coordinator — demand-driven, bounded-memory tile scheduler.

Behaviours: gen_server.

Description

rast_coordinator — demand-driven, bounded-memory tile scheduler.

Owns the tile list for one scene/band and hands out tiles to workers on demand. Workers pull (next_tile/1) when idle; the coordinator never pushes the whole grid into mailboxes (which would materialise the scene in RAM). With at most one tile resident per worker, peak memory is bounded by Workers × tile_bytes — the ceiling from ARCHITECTURE.md §5.

Each tile is handed out exactly once; when the list is empty every puller gets done.

Function Index

handle_call/3
handle_cast/2
handle_info/2
init/1
next_tile/1Claim the next tile, or done once the list is exhausted.
remaining/1Number of tiles not yet handed out.
start_link/1
stop/1
terminate/2

Function Details

handle_call/3

handle_call(Req, From, State) -> any()

handle_cast/2

handle_cast(Msg, S) -> any()

handle_info/2

handle_info(Info, S) -> any()

init/1

init(Tiles) -> any()

next_tile/1

next_tile(Pid::pid()) -> {ok, term()} | done

Claim the next tile, or done once the list is exhausted.

remaining/1

remaining(Pid::pid()) -> non_neg_integer()

Number of tiles not yet handed out.

start_link/1

start_link(Tiles::[term()]) -> {ok, pid()}

stop/1

stop(Pid::pid()) -> ok

terminate/2

terminate(Reason, S) -> any()


Generated by EDoc