mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-30 05:46:15 -06:00
add code comment
This commit is contained in:
parent
bd6a44ec04
commit
0c84a2a5c6
1 changed files with 6 additions and 0 deletions
|
|
@ -30,11 +30,17 @@ import (
|
|||
"github.com/tetratelabs/wazero"
|
||||
)
|
||||
|
||||
// ffmpreg is a concurrency-safe pointer
|
||||
// to our necessary WebAssembly runtime
|
||||
// and compiled ffmpreg module instance.
|
||||
var ffmpreg atomic.Pointer[struct {
|
||||
run wazero.Runtime
|
||||
mod wazero.CompiledModule
|
||||
}]
|
||||
|
||||
// initWASM safely prepares new WebAssembly runtime
|
||||
// and compiles ffmpreg module instance, if the global
|
||||
// pointer has not been already. else, is a no-op.
|
||||
func initWASM(ctx context.Context) error {
|
||||
if ffmpreg.Load() != nil {
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue