Top | ![]() |
![]() |
![]() |
![]() |
AnjutaAsyncCommandAnjutaAsyncCommand — AnjutaCommand subclass that serves as the base for commands that need to run in another thread. |
void | anjuta_async_command_set_error_message () |
gchar * | anjuta_async_command_get_error_message () |
void | anjuta_async_command_lock () |
void | anjuta_async_command_unlock () |
AnjutaAsyncCommand provides a simple way for plugins to run tasks that are synchronous and usually take several seconds or longer to execute in another thread so that such tasks do no block Anjuta's user interface.
AnjutaAsyncCommand automatically runs and manages the thread when the command starts, and destroys it when the command finishes. Aside from locking protected data with anjuta_async_command_lock/unlock, clients, and even commands themselves need not even be concerned that their tasks are rnning on another thread.
For an example of how AnjutaAsyncCommand is used, see the Subversion plugin.
void anjuta_async_command_set_error_message (AnjutaCommand *command
,const gchar *error_message
);
Set the error message this async command resulted in
gchar *
anjuta_async_command_get_error_message
(AnjutaCommand *command
);
void
anjuta_async_command_lock (AnjutaAsyncCommand *self
);
Locks the command's built-in mutex.
void
anjuta_async_command_unlock (AnjutaAsyncCommand *self
);
Unlocks the command's built-in mutex.