You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
usefunction AzJezz\Mutex\lock;
functionfoo(): void {
lock('foo-function', () ==> {
// only one thread at a time may execute this statement
});
}
this would require a new final abstract class MutexRepository to hold the mutex implementation to use with the lock helper.
stub :
finalabstractclassMutexRepository {
publicstaticfunctionset(MutexInterface$mutex);
/** * Implementation should throw an exception if the repository holds * no mutex implementations OR return a default implementation. * * if the implementation returned a default implementations, it should * call `set($default)` to ensure that the same instance is returned in the * next call.*/publicstaticfunctionget(): MutexInterface;
}
The text was updated successfully, but these errors were encountered:
add
AzJezz\Mutex\lock()
helper functions.stub :
usage example :
this would require a new
final abstract class MutexRepository
to hold the mutex implementation to use with thelock
helper.stub :
The text was updated successfully, but these errors were encountered: