lock method

  1. @Deprecated('Will delete in v5.0. Use `QueuedInterceptor` instead, more detail see' ' https://github.com/flutterchina/dio/issues/1308')
  2. @override
void lock()
inherited

Lock the current Dio instance.

Dio will enqueue the incoming request tasks instead send them directly when interceptor.requestOptions is locked.

Implementation

@Deprecated(
    'Will delete in v5.0. Use `QueuedInterceptor` instead, more detail see'
    ' https://github.com/flutterchina/dio/issues/1308')
@override
void lock() {
  interceptors.requestLock.lock();
}