Sublime Forum

Is it AppendCommand synchronous or asynchronous?

#1

I haven’t found the source code of the append command anywhere and I’d like to know whether this command is guaranteed to be synchronous or not. So far I haven’t been able to come up with any test to figure it out.

For instance, something like this test won’t tell me exactly whether such command is synchronous or not… i mean, it seems the probability to be so is quite high and the common sense also tells this command should be a synchronous command but who knows… I don’t trust the common sense :slight_smile:

Could anyone please confirm me its nature or even better, where is it the source code of it hidden? So I won’t have any unexpected behaviour when using it on my commands

0 Likes

#2

I would assume so. All commands are executed synchronously and the append command 8s built-in.

0 Likes

#3

How do you know is a built-in btw? I’ve tried to find it by using EditPreferences plugin, find-in-folder, dir(sublime_api), looking at sublime.py, sublime_api.py … no trace of it anywhere O_o

0 Likes

#4

You can list all commands, which are not built-in via import sublime_plugin; sublime_plugin.all_command_classes, so all other commands are built-in.
I don’t think you can see a list of all built-in commands except from the (unofficial) documentation.

1 Like