Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ functionality is exposed to the command line by the Unix command

There is also a `Magic` class that provides more direct control,
including overriding the magic database file and turning on character
encoding detection. This is not recommended for general use. In
particular, it's not safe for sharing across multiple threads and
will fail throw if this is attempted.
encoding detection. The identification methods `from_file`, `from_buffer`, and `from_descriptor`
serialize access with a per-instance lock, so those methods can be called
from multiple threads on the same instance. This does not cover concurrent
parameter changes through `setparam` or direct access to the libmagic cookie.

```python
>>> f = magic.Magic(uncompress=True)
Expand Down