asCPointer

Native
1.3
fun asCPointer(): COpaquePointer?
(source)
Deprecated: Use kotlinx.cinterop.StableRef instead

Convert worker to a COpaquePointer value that could be passed via native void* pointer. Can be used as an argument of Worker.fromCPointer.

This function is deprecated. Use kotlinx.cinterop.StableRef.create(worker).asCPointer() instead. The result can be unwrapped with pointer.asStableRef<Worker>().get(). StableRef should be eventually disposed manually with StableRef.dispose.

Return worker identifier as C pointer.