File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
crates/duckdb/src/appender Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,19 @@ use crate::{
88} ;
99
1010/// Appender for fast import data
11+ ///
12+ /// # Thread Safety
13+ ///
14+ /// `Appender` is neither `Send` nor `Sync`:
15+ /// - Not `Send` because it holds a reference to `Connection`, which is `!Sync`
16+ /// - Not `Sync` because DuckDB appenders don't support concurrent access
17+ ///
18+ /// To use an appender in another thread, move the `Connection` to that thread
19+ /// and create the appender there.
20+ ///
21+ /// If you need to share an `Appender` across threads, wrap it in a `Mutex`.
22+ ///
23+ /// See [DuckDB concurrency documentation](https://duckdb.org/docs/stable/connect/concurrency.html) for more details.
1124pub struct Appender < ' conn > {
1225 conn : & ' conn Connection ,
1326 app : ffi:: duckdb_appender ,
You can’t perform that action at this time.
0 commit comments