IOSchedule

class IOSchedule
Members defined in IOSchedule (9 members)

is_multithreaded

RW

If true, new text documents will be constructed for multithreaded application, otherwise - single threaded. Only has effect if no TextDocuments is set.

size

R

Returns the number of currently scheduled documents

text_documents

RW

TextDocuments that new text files will be opened in

add_file

add_source

assign_text_documents

Set TextDocuments that new text files will be opened in

make_empty_schedule

set_completion_callback

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.

set_multithreaded

Attributes

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.

property size: int

Returns the number of currently scheduled documents

property text_documents: syside.TextDocuments | None

TextDocuments that 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 TextDocuments that 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
Used in