Function create_lock

  • Creates a simple lock object with two methods, acquire and acquire_immediately.

    The acquire method takes a callback and returns the callback's return value.

    The acquire_immediately method will try to acquire the lock immediately and will invoke the callback with a boolean indicating whether the lock was succesful.

    This implementation is prone to circular deadlocks.

    Returns {}

    Generated using TypeDoc