Skip to content

Commit 47ec31c

Browse files
committed
added withSemaphoreFactory method
1 parent d669ba9 commit 47ec31c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Databags/DriverConfiguration.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,4 +220,17 @@ public function withAcquireConnectionTimeout(?float $acquireConnectionTimeout):
220220

221221
return $tbr;
222222
}
223+
224+
/**
225+
* @param callable():(SemaphoreFactoryInterface|null)|SemaphoreFactoryInterface|null $factory
226+
*
227+
* @psalm-immutable
228+
*/
229+
public function withSemaphoreFactory($factory): self
230+
{
231+
$tbr = clone $this;
232+
$tbr->semaphoreFactory = $factory;
233+
234+
return $tbr;
235+
}
223236
}

0 commit comments

Comments
 (0)