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
{{ message }}
Repository navigation
jextract/jni: Actor properties with synchronous access are imported as async #942
JNI extraction currently treats actor property accessors as implicitly async even when the property is explicitly nonisolated. It also misses the synchronous access path provided by an immutable actor property that witnesses a nonisolated protocol getter.
Example
publicprotocolIdentified{varidentifier:Int64{get}}public actor Record:Identified{publicletidentifier:Int64publicnonisolatedvarlabel:String{"record"}publicinit(identifier:Int64){self.identifier=identifier}}
Both getters can be exposed synchronously, so Java callers should be able to write:
Currently, both getters return CompletableFuture values.
For identifier, removing await from the generated thunk is not sufficient: outside the actor's defining module, direct access to the stored property remains isolated. Synchronous access is available through the protocol requirement, for example:
Activity
ktoso commentedon Nov 4, 2026
Good catch, thank you -- wouldn't you want to submit a fix rather than keep it only in the fork please @teamhimeh ?
teamhimeh commentedon Nov 4, 2026
@ktoso Thank you for watching this issue. We will submit the fix after our internal review.