4 ms·
"Where BeOS drove ahead of other operating systems of its time (and where Haiku is still ahead of contemporary operating systems) is that each individual applic
by eslaught 15y ago
"Where BeOS drove ahead of other operating systems of its time (and where Haiku is still ahead of contemporary operating systems) is that each individual application uses many threads. The core of the application itself has one thread, and each window the application creates has a thread."
I might not have been around when BeOS was first created, but this is certainly not a new concept today. I don't think I can name a major OS today that doesn't support this model. Both Android and iOS are well known for this technique, but they were hardly the first to adopt it.
- mhd 15y agoHmm, good question, concurrency and UIs seem a natural fit, what was some prior art and who used it first? I can name Modula-3's Trestle and Pike's Newsqueak language/GUI from the top of my head. Didn't Xerox' Mesa use threads for this?
- wmf 15y agoBeOS's (intended) competition was MacOS 8 and Windows 95, which probably weren't that thread-savvy. In retrospect, the forced multithreading certainly improved responsiveness but also made porting software painful (since all other GUIs have a single event-loop thread).
- DHowett 15y agoiOS doesn't actually spawn a new thread for every window in an application. All of the UIKit calls are still very thread-unsafe and expect to be used only from the main thread. This doesn't really cause much of a problem, since apps are page-based: you don't need to update more than one or two windows at one time, anyway.
- chc 15y agoYeah, for anyone who doesn't believe this, do a search for _WebThreadLockFromAnyThread sometime. All those Stack Overflow questions are from people who thought it was safe to have threads anywhere near UIKit.
- wtracy 15y agoBeOS was (and arguably still is) the only platform with a UI toolkit and system API that strongly encourages pervasive multithreading. Everywhere else, you have the option of writing asyncronous code, but the libraries are all designed primarily for single-threaded use cases.
- batista 15y agoSo, BeOS is somewhat akin Node.js for operating systems?
- wmf 15y agoNo, every other GUI is akin to Node.js (single-threaded event-driven), while BeOS is more like Java servlets.
- gecko 15y agoThat also made it rather hellish to program, given you had 1990s multithreading technology and debugging techniques to work with. Something more akin to WinRT in Windows 8, where everything works through callbacks on a single thread by default, is a much better way to approach the problem, IMHO.
- brazzy 15y agoMultithreaded UI toolkits have been tried and abandoned as impossible to program stable applications in many times, first at Xerox PARC (like so many other things people keep reinventing).
- pjmlp 15y agoThis was not true. On those days Windows NT was already available with a multithreaded kernel from day one and the ability to make use of them at the UI level as well. When compared with the 9x family, yes, but not with the NT family.