Reference
Limits
Threads, coalescing, timeouts, memory and message sizes.
- One thread runs a module's code:
on_start, every handler,run()andon_stop, one after another. Handlers never overlap, so state onselfneeds no lock — and a handler that blocks holds every other one up. - A tick that has waited over a second with a newer tick for the same handler and symbol queued behind it is skipped; a schedule call is coalesced the same way. A closed bar, a fill, an order event, a signal and a news article always run, in order.
- A data call that gets no answer within 30 seconds raises
TimeoutError; an order call raisesWhile25ErrorTIMEOUTafter 25 (see Orders). - Each module runs in its own process, below the platform's priority, with
2 GB of address space (
W25_WORKER_MAX_MBchanges it); a module over it is stopped as itself, and the platform says so. A file it writes is at most 2 GiB (on macOS and Linux); one log or output line is cut at 8 MiB; one message to the platform is at most 16 MiB. Anemit()payload must pickle.