Each Lisp
mp:process
has a separate native thread, but Lisp code can only run in one thread at a time and a lock is used to enforce this.
When a foreign function is called using the FLI, the lock is released until the function returns. This allows other Lisp threads to run, for instance while waiting for a database query to execute.
You can call back into Lisp using
fli:define-foreign-callable
in any thread.