The World of MP
Multiprocessing with REAL Studio
Issue: 9.3 (March/April 2011)
Author: Marc Zeedar (with code by Thomas Tempelmann)
Article Description: No description available.
Article Length (in bytes): 13,848
Starting Page Number: 35
RBD Number: 9308
9308project.zip Updated: Wednesday, March 2, 2011 at 1:45 PM
Related Web Link(s):
Known Limitations: None
Excerpt of article text...
Most of us are comfortable with the idea of multi-tasking. Today's computers, even our cell phones, are so powerful they can do more than one thing at a time. Technically they often aren't actually doing tasks simultaneously—they are just so fast they make it seem like it. But if your CPU has multiple cores, it is capable of running multiple processes simultaneously. The question is, how do you write software capable of using those multiple processors?
For multitasking, REAL Studio supports threads. You can package a task into a thread and it will execute while other aspects of your application are running. But threading doesn't support multiple cores. Normally you need a third-party plugin for multiprocessing, but today we're going to explore a system devised by Thomas Tempelmann that allows multiprocessing with pure REALbasic code. His technique uses a main application that calls separate worker applications. (It's based on an idea Mars Saxman mentioned [http://www.redecho.org/2008/12/16/concurrency/] a while back.)
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.