IOSchedule
- class IOSchedule
-
Members defined in
IOSchedule(9 members)
RWIf true, new text documents will be constructed for multithreaded application, otherwise - single threaded. Only has effect if no
TextDocumentsis set.
RReturns the number of currently scheduled documents
RWTextDocumentsthat new text files will be opened in
Set
TextDocumentsthat new text files will be opened in
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.
Attributes
- property is_multithreaded: bool
If true, new text documents will be constructed for multithreaded application, otherwise - single threaded. Only has effect if no
TextDocumentsis set.
- property size: int
Returns the number of currently scheduled documents
- property text_documents: syside.TextDocuments | None
TextDocumentsthat new text files will be opened in
Methods
- 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
- assign_text_documents(arg: syside.TextDocuments, /) syside.IOSchedule
Set
TextDocumentsthat new text files will be opened in
- static make_empty_schedule(multithreaded: bool = False) 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.
- set_multithreaded(arg: bool, /) syside.IOSchedule