Commit 8aeb49b
committed
[Core] Allow parallel handling of requests from same session
This adds a session_write_close() call to the end of NDB_Client,
after the last reference to $_SESSION has been made. This causes
PHP to release the lock it holds on the session file which prevents
further incoming requests from being handled. After this point in
NDB_Client all of our session related state should be read from
the PSR request, not the superglobal.
PHP by default holds a lock on the session until it is closed in case
there is a write to the superglobal. However, this prevents other
requests from the same session from reading the variable (which
is where our login state is stored) until the end of the request,
when the lock is released. Closing it explicitly releases the lock
and allows us to handle multiple requests from the same user in parallel
instead of in series.1 parent c38f1c1 commit 8aeb49b
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
| |||
0 commit comments