This table contain function to manipulate the control flow of lua programs. It provides ways to do background jobs and other related functions



TRUE when darktable is terminating Use this variable to detect when you should finish long running jobs


  function : function,
  ... : anything

Runs a function in the background. This function will be run at a later point, after luarc has finished running. If you do a loop in such a function, please check darktable.control.ending in your loop to finish the function when darktable exits

  • function - function - The call to dispatch
  • - anything - extra parameters to pass to the function


  delay : int

Suspends execution while not blocking darktable

  • delay - int - The delay in millisecond to sleep


  command : string
) : int

Run a command in a shell while not blocking darktable

  • command - string - The command to run, as in ‘sh -c’
  • return - int - The result of the system call


  file : file

Block until a file is readable while not blocking darktable This function is not available on Windows builds

  • file - file - The file object to wait for