Thread-safe is not a problem, since any thread can simultaneously try to access the context (at the same time). And, although this is normal, in situations with low memory, for example, with the extension for editing photos on iOS devices, two threads accessing the same context can lead to the crash of the application due to low memory.
This occurs when mixing main image filters with vImage operations. Both of them are thread safe, but ARC will not release the vImage buffer data before processing the Core Image object, so at some point you have two copies of the image in memory.
Accordingly, you never think that your knowledge of thread safety is complete without understanding thread and concurrency, and this doubles for any answer to thread safety questions. In short, the right question is how thread safety applies to memory usage whenever you talk about image processing.
If you just kick the tires here, you need to wait to ask your question until you run into a real problem. But, if you are planning your next step, you need to know how to sequentially execute image processing commands, and with manual release. You must create your application so that only one copy of the image is processed in memory. Never rely on automatic release - thread safe or not - to do this for you. THIS DOES NOT WORK.
source share