You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the Worker struct is defined as follows:
structWorker<'a>{
...
}
where 'a is a lifetime parameter of the Tokenizer. By this definition, the Worker can refer to the Tokenizer automatically for every tokenization.
This definition causes a problem when creating wrappers for other programming languages that use garbage collectors (GC).
The above definition means that the Tokenizer cannot be removed when the Worker is alive, but there is no way to impose this constraint on the GC.
To solve this problem, we need to remove the lifetime parameter and give the Worker struct to the Tokenizer for every tokenization.
The text was updated successfully, but these errors were encountered:
Currently, the
Worker
struct is defined as follows:where
'a
is a lifetime parameter of theTokenizer
. By this definition, theWorker
can refer to theTokenizer
automatically for every tokenization.This definition causes a problem when creating wrappers for other programming languages that use garbage collectors (GC).
The above definition means that the
Tokenizer
cannot be removed when theWorker
is alive, but there is no way to impose this constraint on the GC.To solve this problem, we need to remove the lifetime parameter and give the
Worker
struct to theTokenizer
for every tokenization.The text was updated successfully, but these errors were encountered: