My project is neither urgent (I've been procrastinating for months now), nor mission critical, so I'm free to experiment and fiddle.
The project (named 'pancakes' due to the number of pancakes I consumed when I first had the idea) is a playlist framework 'thingy'. I'm still not sure exactly how pancakes will work, since I'm only in the early design phase, but I'm assuming that there will be forking/threading going on (typical setup of 1 thread for user interface, and 1 thread for doing the work).
I'm probably going to interact with mplayer (or perhaps XMMS2, if (stable) perl bindings ever get released for it). Not too keen on the alternatives (mpg123, etc), since they seem to only play mp3s/oggs (my playlist has all sorts of file formats in it). Interaction with mplayer will probably be done via system() or similar.
That's all I can really think of pancakes-wise (if anyone is interested and/or wants to help, feel very free to reply :-) ). It'll all be released under GPL, so whatever solution I find will be free for all. I'll probably also blog/wiki it (and if I make a good article, will post at the monastry).
From what has been said so far, it sounds like forking in a thread is unsafe, unportable, and unwise. I think the best thing in the given situation would be:
If I come up with any better ideas, I'll post another message :-)
Thanks to all who replied
In reply to Re^2: Using forks and threads
by ColinHorne
in thread Using forks and threads
by ColinHorne
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |