[mb-devel] libmusicbrainz3 testing

Michael Davidson slaad at bong.com.au
Sat Jul 22 23:12:27 UTC 2006


Tobias Rundström wrote:
> What I have discovered when I have been working with libmusicbrainz2
> is that I would really like it to be asynchronous. Right now you have
> to create a new thread and loop in that thread to do synchronous
> operations.
> 
> I would like an option (both for musicbrainz and in the long run
> maybe for tunepimp) where you can access the filedescriptor, add it
> to your GMainLoop (or QSocketNotifier) and when data is available you
> do mb_process_events(fd); which calls the callbacks you have setup.
> 
> This would really help writing UI applications.
> 
> What do you think?

Personally I think it's a bad idea. In my opinion libmusicbrainz should 
be a low level library that gets the data and gives it to the developer. 
In it's current form it is extremely portable. Thread creation, on the 
other hand, is rather OS specific (pthreads aren't available on all 
platforms). If an asynchronous mode is really required put it in 
libtunepimp which is far less portable and isn't necessary for MB 
integration.

---

Michael Davidson



More information about the MusicBrainz-devel mailing list