Closed jmark closed 1 year ago
Thanks! I'm wondering, should sc_finalize reset is_initialized to 0. This will also set the package id back to -1.
The user should be told very clearly that these functions are not thread-safe and refer to global variables.
Good point! I adapted the code accordingly. Also added a note about not being thread-safe.
I can actually think of use cases where SC
is initialzed and finalized multiple times during the runtime of an application.
Querying the current status of SC
would be very helpful in such cases.
Thanks! Just added some doc tweaks.
In some scenarios it is useful to have a dedicated query function for SC's own package id. For example, not all wrapper generators or FFIs (foreign function interfaces) support to read global external variables.