(&self, vm: &VirtualMachine)
| 1571 | } |
| 1572 | |
| 1573 | fn check_thread(&self, vm: &VirtualMachine) -> PyResult<()> { |
| 1574 | if self.check_same_thread.load(Ordering::Relaxed) { |
| 1575 | let creator_id = *self.thread_ident.lock(); |
| 1576 | if std::thread::current().id() != creator_id { |
| 1577 | return Err(new_programming_error( |
| 1578 | vm, |
| 1579 | "SQLite objects created in a thread can only be used in that same thread." |
| 1580 | .to_owned(), |
| 1581 | )); |
| 1582 | } |
| 1583 | } |
| 1584 | Ok(()) |
| 1585 | } |
| 1586 | |
| 1587 | #[pygetset] |
| 1588 | fn in_transaction(&self, vm: &VirtualMachine) -> PyResult<bool> { |