Closed hyousefGopher closed 4 years ago
No, this isn't possible. Note that a Context
holds the GIL, so with a static context it would never be released.
Actually, that isn't true, it doesn't hold the GIL. You do need to acquire the GIL to create a context though, so this still isn't possible in a const fn
.
It happened that I need to use the context in multiple Rust function, so I thought to define it as global one like this:
But I got the below error: