mirror of
https://github.com/logos-messaging/nim-ffi.git
synced 2026-08-05 14:33:13 +00:00
12 lines
376 B
Nim
12 lines
376 B
Nim
import results
|
|
import ffi
|
|
type TestLib = object
|
|
var sharedPool: FFIContextPool[TestLib]
|
|
when isMainModule:
|
|
let s = sharedPool.staticFFIContext().valueOr:
|
|
quit("static failed: " & error)
|
|
echo "static ctx: ", cast[uint](s)
|
|
# Simulate the rest of the suite doing light work, then exit with the
|
|
# static thread still running.
|
|
echo "exiting with static thread alive"
|