[semidet]http_in_session(-SessionId)True if SessionId is an identifier for the current session.
The current session is extracted from session(ID)
from the
current HTTP request (see http_current_request/1).
The value is cached in a backtrackable global variable http_session_id
.
Using a backtrackable global variable is safe because continuous worker
threads use a failure driven loop and spawned threads start without any
global variables. This variable can be set from the commandline to fake
running a goal from the commandline in the context of a session.
- See also
- http_session_id/1