Skip to content

Commit fdac4ac

Browse files
committed
implemented Send + Sync for LlamaContextParams
1 parent bd444f9 commit fdac4ac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llama-cpp-2/src/context/params.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ pub struct LlamaContextParams {
6969
pub(crate) context_params: llama_cpp_sys_2::llama_context_params,
7070
}
7171

72+
/// SAFETY: we do not currently allow setting or reading the pointers that cause this to not be automatically send or sync.
73+
unsafe impl Send for LlamaContextParams {}
74+
unsafe impl Sync for LlamaContextParams {}
75+
7276
impl LlamaContextParams {
7377
/// Set the seed of the context
7478
///

0 commit comments

Comments
 (0)