Showing posts with label RThread. Show all posts
Showing posts with label RThread. Show all posts

Thursday, December 18, 2008

Symbian C++ sucks

Let's say you are developing on a Symbian phone. You are creating something more complex than a "Hello World" app so you need threads.

You create a RThread, and inside that thread you append things to a RArray (dynamic array) and then from the main thread you want to retrieve them.

NO! You can't! Accessing elements of a RArray from two different RThreads is not allow and it'll crash on you.

Ok you think, they just ported STL to Symbian, let's use a std::list, and NO! It'll crash even earlier.

So you are about to throw the phone across the window, but then you think, wait the also ported some POSIX things to Symbian, and try pthread and it suddenly works and you realize how simple things can be a nightmare when using weird tools/SDK, that's why Qt rocks it gives you almost all you want in a practical API, and when something is missing KDE adds the missing bit.