• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 

thread-safe?

Started by FireStarter, 8 March 2008, 23:48:04

Previous topic - Next topic

FireStarter

Hi there, really impressive library.

Question (couldn't find anything related): is it fully thread-safe? 
That is, I don't expect manipulations on the same image to be thread-safe (I would use my own locking for that), but would an image browser be able to load images using different threads (for faster loading with multicores, and for smoothness of the GUI)? I mean, would the internals of the image loaders conflict between instances in other threads?

Thanks

Galfar

Well, short answer is: not thread-safe.
I think most of the operations could be used concurrently but
there are some that use some global variables and structures
(I can remember color reduction but there are others).
If you would only load images most loaders should be safe.
PNG/MNG/JNG loader is not safe currently but that could be fixed
easily. I don't know about loaders that use 3rd party libraries
(JPEG, JPEG2000, TIFF).

It would be great if you could try it and report image loaders that cause problems
so I could look at them. I really don't have much time these days.

Imaging 0.3x will be thread-safe but that is still a long way from being released.

Galfar

I've fixed some concurrency issues in Network Graphics (PNG/MNG/JNG) and Portable Maps loaders (PAN, PBM, PPM, ...). JPEG, JPEG2000, and TIFF loaders all seem to work fine.

Updated code is in the SVN repository.

FireStarter


Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name:
Email:

Shortcuts: ALT+S save/post or ALT+P preview

SMF spam blocked by CleanTalk