UrlRequest.Builder.SetDirectExecutorAllowed(Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
WARNING: This method should not be called with setDirectExecutorAllowed(false) as this may lead to incorrect behaviour on older versions of HttpEngine.
[Android.Runtime.Register("setDirectExecutorAllowed", "(Z)Landroid/net/http/UrlRequest$Builder;", "GetSetDirectExecutorAllowed_ZHandler", ApiSince=34)]
public abstract Android.Net.Http.UrlRequest.Builder SetDirectExecutorAllowed(bool allowDirectExecutor);
[<Android.Runtime.Register("setDirectExecutorAllowed", "(Z)Landroid/net/http/UrlRequest$Builder;", "GetSetDirectExecutorAllowed_ZHandler", ApiSince=34)>]
abstract member SetDirectExecutorAllowed : bool -> Android.Net.Http.UrlRequest.Builder
Parameters
- allowDirectExecutor
- Boolean
true to allow executors performing inline execution, false otherwise.
Returns
the builder to facilitate chaining. This value cannot be null.
- Attributes
Remarks
WARNING: This method should not be called with `setDirectExecutorAllowed(false)` as this may lead to incorrect behaviour on older versions of HttpEngine. Marks whether the executors this request will use to notify callbacks (for UploadDataProviders and UrlRequest.Callbacks) is intentionally performing inline execution, like Guava's directExecutor or ThreadPoolExecutor.CallerRunsPolicy.
Warning: If set to true: This option makes it easy to accidentally block the network thread. This should not be done if your callbacks perform disk I/O, acquire locks, or call into other code you don't carefully control and audit.
Android reference for android.net.http.UrlRequest.Builder.setDirectExecutorAllowed.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.