syside.IOSchedule
- class IOSchedule
- static make_empty_schedule(multithreaded: bool = False) syside.IOSchedule
- property text_documents: syside.TextDocuments | None
TextDocuments
that new text files will be opened in
- property is_multithreaded: bool
If true, new text documents will be constructed for multithreaded application, otherwise - single threaded. Only has effect if no
TextDocuments
is set.
- set_multithreaded(arg: bool, /) syside.IOSchedule
- assign_text_documents(arg: syside.TextDocuments, /) syside.IOSchedule
Set
TextDocuments
that new text files will be opened in
- add_file(path: str | os.PathLike[AnyStr], language: str, tier: syside.DocumentTier = DocumentTier.Project) syside.IOSchedule
- add_source(url: syside.Url, contents: str, language: str, tier: syside.DocumentTier = DocumentTier.Project) syside.IOSchedule
- set_completion_callback(arg: Callable[[syside.SharedMutex[syside.TextDocument], syside.IOSchedule], None], /) syside.IOSchedule
Set completion callback that will be invoked when a text document is ready. The second callback argument contains the index of the document, and order between add_* is preserved. Note that this may be called from multiple other threads so this should be thread-safe, e.g. by sizing a result buffer to size() before executing this schedule and only modifying the element at the callback index.
On a single-thread executor, only the first enqueued unique source will invoke this callback. On multithreaded executors, any one of duplicated sources may invoke this callback, however it is unspecified which. Deduplication is performed based on resolved absolute URLs.
- class CallbackData
- property index: int
The index of the associated text document. Matches the order it was added to the schedule.
- property tier: syside.DocumentTier
Tier the text document was added with.