public function testSerialisation(callable $mutexFactory)
{
$timestamp = microtime(true);
$this->fork(2, function () use($mutexFactory) {
$mutex = call_user_func($mutexFactory);
$mutex->synchronized(function () {
usleep(500000);
});
});
$delta = microtime(true) - $timestamp;
$this->assertGreaterThan(1, $delta);
}