File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Sources/SwiftJavaDocumentation/Documentation.docc Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -328,3 +328,19 @@ which conform a to a given Swift protocol.
328328
329329#### Returning protocol types
330330Protocols are not yet supported as return types.
331+
332+ ### ` async ` methods
333+
334+ > Note: Importing ` async ` methods is currently only available in the JNI mode of jextract.
335+
336+ Asynchronous methods in Swift can be extraced using different modes, which are explained in detail below.
337+
338+ #### Async mode: completable-future (default)
339+
340+ In this mode ` async ` methods in Swift are extracted as methods returning a ` java.util.concurrent.CompletableFuture ` .
341+ This mode gives the most flexibility and should be prefered if your platform supports ` CompletableFuture ` .
342+
343+ #### Async mode: future
344+
345+ This is a mode for legacy platforms, where ` CompletableFuture ` is not available, such as Android 23 and below.
346+ In this mode ` async ` methods in Swift are extracted as methods returning a ` java.util.concurrent.Future ` .
You can’t perform that action at this time.
0 commit comments