# Thread Safety

The `ParticleDatasetReader` and `PtfxDatasetWriter` classes are internally synchronized with a mutex, making them safe to call from multiple threads concurrently. Common multi-threaded patterns include:

- Reading frames on a background thread while the main thread renders
- Calling `preloadFrames()` from a background thread
- Writing frames from a producer thread while another thread continues simulation

Note

`ParticleModel` itself must be accessed from the rendering thread (or with external synchronization), as it interacts with OpenGL state. Only the reader and writer are thread-safe internally.

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Envision for Desktop in your own language, or choose a sample question below to start a conversation:

What is HOOPS Envision for Desktop?
What are the latest release notes for HOOPS Envision for Desktop?
How do I start evaluating HOOPS Envision for Desktop?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...