AsyncWorker, a library for creating task queues

AsyncWorker is a GObject-style library (liboasyncworker.so) that will ease implementing a task queue. By
which I mean a system like a printer spool, but for functions (or methods) rather than printer-tasks. So for
each queue instance, there’s always maximum one task being processed. Tasks can’t be preempted (it’s not a kernel scheduler),
but tasks that haven’t run or aren’t running can be removed. Of course can the kernel preempt tasks (the entire proces). I mean
that within your application, you can’t preempt a task: to make another task happen before the current task ended. While using
the same queue instance.

Creating a task happens by creating a OAsyncWorkerItem instance, which is of course a simple GObject. The object
holds, for example, a reference to a launcher function (the task itself), a callback (to cleanup your stuff after
the launcher finished), a launcher-arguments pointer (user data for the launcher) and a priority.

Once you add the item to the OAsyncWorker instance, the worker will make sure that at some point in the future, the
item will be processed. The higher the priority of an item, the faster it will be selected to be processed.

My plans for this one are to replace a specific GList with a GAsyncQueue. And to let all the signals (it has signals like
item_finished, item_added and item_removed) emit in the GMainLoop.

There’s some basic support (on platforms that support this) to set CPU affinity on a queue-instance. This way you,
as the programmer, can specify on which processors the queue may process it’s tasks. I haven’t yet added support
for the other sched.h functions. You can, of course, use multiple queues simultanously.

There’s no support for cancellation of the current-item (but you can remove items that haven’t ran). The reason is
rather simple: GThread isn’t supporting thread cancellation (for good reasoning). Yet, you can of course implement your own
cancellation-points and a cancel trigger. I might add functionality to ease this (not sure yet).

You’ll still need to use gdk_threads_enter() and gdk_threads_leave() in the launcher and callback functions of your
tasks. For example in case you’re planning to perform gtk stuff. You wont need to do that in the signal-handlers.

Mikael Hallendal invented both the name AsyncWorker and the namespace
to which I renamed this library. That namespace is “O”. It means “Onion”. It’s indeed to make sure that now we have
“Egg”, “Bacon” and “Onion”. Yet you can’t blame me for it!

pvanhoof - EggAsyncWorker ? :)
Hallski - eek
luis - I think Egg is a curse :)
Hallski - OnionAsyncWorker
pvanhoof - lol
Hallski - so we have an entire omelette
Hallski - with Egg, Bacon and now Onion

You can find asyncworker as a module in CVS here. You can find a simple sample that illustrates all this a little bit here.

Please note that the API isn’t stable (this is bleeding edge and very new). I did, however, already added some API documentation (so you can already generate API-documentation).

Anjuta 2.0

Hey John and others who’ll tryout this new release of Anjuta. I created this little script that will help you (compile and) keep that checkout of Anjuta updated. If you’re using one of the popular GNOME-from-CVS buildscripts, this ain’t useful of course.

Viewing ppts with Evince

About Marc Maurers Evince stuff: And if you want to let Evince also load some ppts without making it crash on most of them, try this patch which I quickly created while debugging this stuff :-).

There’s still much work. The stuff in present/libpresent/, for example, needs love!

The alarm notification dialog of Evolution

A few weeks ago I blogged about a multi-alarm aware alarm notification dialog in Evolution. Now Evolution’s HEAD has reopened, these patches have been accepted by Rodrigo Moya and are now availabe in Evolution’s CVS.

It looks like this:

I hope people will like this improved alarm notification userinterface. You can suggest HIG specifics about it on the evolution-hackers mailinglist.

Going to GUADEC

I decided to go to GUADEC this year. My employer was also convinced it’s a good idea so I’m even getting sponsored for it. Traveling expenses, food, the hotel and the conference price for professional GNOME Foundation members are being payed by my employer. Thanks :-).

I’ve been to all FOSDEM‘s (Brussels). I’m hoping the GUADEC meeting will be even more technical. So even more programmers and even more interesting discussions and presentations from GNOME developers. If I checkout the planned schedule, I’m confident I’ll be satisfied.

One of my colleagues, Bjorn Monnens, will be joining me. He’s mainly interested in the Nokia, Eclipse and Java talks. He works as a Java and .NET developer for our GIS-group. So that’s probably his reasoning. He’s also getting interested in different opensource (free software) projects. So it isn’t a bad idea to invite him, right?

I’ll be visiting Keiths talk about fdo, Fresh and new evolution maintainer Harishs Eplugin talk, Owens talk about Cairo, Wims talk about GStreamer, Roberts fast and slick talk, Damiens talk about gnomemeeting (so that I can explain my girlfriend why it often doesn’t work), Jons talk about Beagle, Federicos talk about Mono, Thomas talk about Flumotion and probably many many more lightning talks and/or other non scheduled talks.

Multithreaded GLib applications

Okay. I learned this the hard way: Never use the pthread API in glib applications. Use the GThread stuff! For example will the GList type reuse memory from the memory pool (the GAllocator stuff). This memory pool is locked using G_LOCK macros. If you didn’t launch g_thread_init(NULL), those macros won’t really lock the code-parts that ought to be locked. Therefor won’t the GList be threadsafe. So filling multiple glists in multiple threads can (and probably will) cause race conditions.

The GThread stuff will wrap pthread functions on platforms that use pthread as threading implementation. It doesn’t support the pthread_cancel() function. But then again, is the cancellation of threads not a clever thing to do. It’s better to implement cancelling of parallel procedures by checking some condition that might have been set by another thread (and returning or g_thread_exit in the thread that is to be cancelled).

“Linux Kernel Development” by Robert Love

I received my copy of “Linux Kernel Development” by Robert Love from Amazon. Started reading it. I even reached chapter seven by now! It’s a good book, easy and fun to read. For example when Robert starts to describe bottom halves (like) softirqs and tasklets and how important it is to use tasklets rather than softirqs. That chapter is a little bit subjective but for sure fun to read.

For example on page 96: To further confound the issue, some people refer to all bottom halves as software interrupts or softirqs. Ignore those people. They run with the same crowd that named the BH and tasklet mechanisms.

And on page 97: Some people also confusingly call all bottom halves “softirqs,” but they are just being annoying.

Okay. I get the point :-). Not all bottom halves are softirqs! Your code should be using tasklets (unless you have a really good reason for using softirqs) and tasklets are in fact build upon softirqs. (Did you really need 20 pages to explain that Robert?)

Going to start reading about Work Queues now.

A generic desktop application configuration management system

Since people started blogging about this[1], I feel I have to respond in blog-fashion. I’m probably wrong about that, but oh well. It won’t hurt much. So far I never used my personal blog-space for this type of discussions so bear with me.

I’ll introduce myself first: Yes, I’m one of the people who are actively discussing the requirements and design of a possible generic desktop application configuration management system dubbed D-Conf. In fact, I’m the person who started collecting some of the requirements using this wiki. This doesn’t mean I’m the only person. I’m not.

So whats the status? So far have a few people added and/or corrected both views and real requirements to this wiki-page. Some xdg-list quotes from developers of important applications have been used to form some requirements. Other requirements listed on the wiki-page originate from the many many discussions and threads that popped up on the xdg-list about this subject. So you’d say the project has most of the requirements, why isn’t development starting? It’s a good question.

And it has a simple answer:

First does the wiki-page need some Guassian filtering on the collected requirements. And a project leader would need to select which requirements will become the features of the first releases.

And second so far nobody in the group of interested people is qualified to actually lead this project. Such a qualified person would have to carry a very heavy burden with this project and he (or she) would need the trust from most important desktop environment communities and desktop application developers. A bad project leader would condemn the project. Thats why I, personally, decided not to lead this project. I just started the wiki-page with requirements because Alexander Larsson suggested me to start collecting them. That doesn’t mean I want to lead the project. I bet thats a relief to a lot people. As a project leader I would probably get the implementation done. However, I wouldn’t manage to get acceptance from all desktop environment communities. I know that. Therefor I understand that I, as a project leader, would condemn the project long before it’s started.

I’m also confident that without a project leader, nor the implementation nor acceptance would happen successfully. I am, however, highly interested in helping with the implementation of a new such system. So my role would (or will) be a developer (a coder). Not really a decision-making or leading role.

I understand many people are thrilled about this and want to see it happen. I even got a few personal mails from people who’ve been following the discussions and who have read that I wasn’t interested in leading this project. They tried encouraging me to continue leading it (while I never played a leading-role, but .. okay). I guess these people will have to be patient. There’s still many things to discuss first. It’s not easy to convince certain developers and people. And its not easy to agree on which technologies to use and depend on. And IMHO does the project still need a project leader. We can’t start without. Or IMHO it would be a foolish attempt.


[1] I’ll list the blogs in chronological sequence

Stupidity of dconf by Aaron J. Seigo,
On the virtues of a common configuration system by Waldo Bastian,
It’s not the virtues, stupid ; or, more D-Conf fun by Aaron J. Seigo,
freedesktop.org by Havoc Pennington.

Matthew Thomas first 48 hours enduring Ubuntu Hoary

Make sure you read this.

G-inspector is so cool!

Check this out. In the screenshot you can see me doing edits and analysis on the userinterface of a running Evolution instance. Like getting and setting the properties of the userinterface-widgets. For illustration I’ve set the second button on the toolbar invisible. You can find more about g-inspector here.

Related information: For people who need accesibility-aid, you can checkout at-poke. It allows you to poke-around in widgets that have accesibility-support.

Skiing in La Bresse, France

My girlfriend and I stayed at a very lovely chalet in G�rardmer. What I can tell you was that we had beautiful warm weather (around twenty degrees Celsius). Yet there was snow on the mountain for skiing. The pistes where not in a perfect condition but overall they were okay. The area wasn’t very huge. Nevertheless it was big enough for a “one weekend” ski-trip. You can find a picture of my girlfriend sitting both in the snow and enjoying the sun here.
And on this movie you can actually see her skiing.

For her it was the first time she went skiing. I recommend La Bresse to everybody who’s going to ski for the first time. Since it’s perfect for weekends. Not very expensive. And when driving from Belgium it’s not even far from home.

Bounty #127557

Cool! I finally received my bounty cheque! It was for doing this bounty.
Clickerdieklik for a webcam snapshot.

Distributing the free cd’s from Ubuntu

Yesterday I gave away the free Ubuntu cd’s which I mentioned here.

I needed fifteen minutes to get rid of one box of fifty such CD’s and I left the remaining 100 cd’s to get picked up this Friday by a second teacher
who’s going to give them away to students and by colleagues who haven’t got one from me personally. A few weeks ago we already distributed
a box of fifty Ubuntu Warty CD’s at our company. So that brings the number to 100 owners of an Ubuntu Warty CD. Thats one in seven. Sweet.

We are actually getting some questions about Ubuntu on our Linux company mailinglist. So I assume thats a sign the CD’s are actually being used.

More hacking on the alarm notification dialog of Evolution

Yesterday I wrote about the multi alarm notification dialog box. Evolution hacker Dobey was a bit displeased with my userinterface.

So he proposed a new one. After some discussion on IRC and sending some userinterface-mockup screenshots in both
directions to each other we found this getting more or less the way we want it. Other screenshots here and here.

This might get into Evolutions 2.3 release. It’s posted to the evolution-hackers mailinglist and filed as an assigned-to-me Cosmetic bug here.

It’s not a promise it will be available in that release. But chances are getting high.

Hacking the alarm notification dialog of Evolution

During one of the #evolution-meeting’s I got interested in implementing a feature request. The feature request requested that the alarm notification dialog would be shared for all alarm notifications that happen while you’re not paying attention.

At this moment will Evolution spawn a new instance of a dialog box each time an alarm notification happens. If you leave your Evolution instance running for a few hours and extensively use the calendaring and it’s alarm-features. You might end up with a desktop with lots of such dialog box instances.

After my work on this, Evolution will make a treeview/listbox at the left of the already created dialog visible and will add the alarm notification
to the dialog box instance.

Click for a screenshot

This won’t make it to the Evolution 2.2 release. I’m not even sure yet whether it will ever be included whatsoever. Nevertheless can you already try it.

You can find documentation on building Evolution from source here. You’ll have this alarm-notification stuff after applying this patch. I created that BuildEvolutionFromSource a few weeks ago for people who are planning to hack on Evolution. So don’t let the hassle of building Evolution hold you back. It’s easy.

Getting free cd’s from Ubuntu

Ubuntu is so cool. A few weeks ago I used this URL to ask for 200 Ubuntu Warty cd’s to giveaway at my company (Cronos/X-Tend). They actually shipped it. So now I have a box full of Ubuntu Warty cd’s. Thats so cool! Thanks Ubuntu! I can’t wait for my Hoary order.

I’ve already gave 50 of the cd’s to a friend of mine who is going to distribute them in schools. He’s a teacher informatics and maintains software and hardware in a few schools here in Belgium/Antwerp.

Winning time in real-time time- and interrupt critical measurements and processes by being asynchronously

On this url you can find a document which I wrote that explains how to win time during real-time time -and interrupt critical measurements and processes by being asynchronously. It explains how to read from slow devices while letting faster devices perform stuff in parallel.

Ons onderwijs systeem en patenten

Dit is een brief die verstuurd werd naar ondermeer de Belgische minister van onderwijs. Het handelt over ons onderwijssysteem (meer bepaald de informatica lessen) en software patenten.

My view on the beauty and the beast (of informatics)

Here you can find my personal view on the company Microsoft.

Digitale TV, innovatie of een inbreuk op onze privacy?

Dit is een document dat ik schreef en dat handelt over het opkomende Digitale TV tijdperk en eventuele consequenties die daaraan verbonden zouden kunnen zijn.