Homec4science

Allow connections to be closed; close connections for global locks

Authored by epriestley <git@epriestley.com> on Jul 24 2012, 04:06.

Description

Allow connections to be closed; close connections for global locks

Summary: Add an explicit close() method to connections and call it in GlobalLock.

Test Plan:
Wrote a script like this:

$lock = PhabricatorGlobalLock::newLock('test');
echo "LOCK";
$lock->lock();
sleep(10);
echo "UNLOCK";
$lock->unlock();
sleep(9999);

Using SHOW FULL PROCESSLIST, verified the connection closed after 10 seconds with both the "MySQL" and "MySQLi" implementations.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1470

Differential Revision: https://secure.phabricator.com/D3035

Details

Committed
epriestley <git@epriestley.com>Jul 24 2012, 04:06
Pushed
aubortJan 31 2017, 17:16
Parents
rPHafa2dbc3dc3c: Accept GET requests for jump nav
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHf1270315e9ae: Allow connections to be closed; close connections for global locks (authored by epriestley <git@epriestley.com>).Jul 24 2012, 04:06