I'm a recent Apple convert.  The quality of the software is just amazing.  I 
use Ubuntu at work for my workstation, and I love it, too.  But the difference 
in the quality of apps and the overall desktop user experience doesn't compare 
with Lion.

The test program actually spawns 1000 threads :)

In a WWW serving environment, I could see a single request using 3 threads to 
overlap operations in parallel.  One thread could be querying a database, 
another could be doing some RESTful type API call to a remote server, etc.  It 
might be useful for dealing with pipelined requests, and to implement something 
like SPDY or WebSockets as well.

The drawback to threads and v8 is that due to Locker, you can only have one 
thread actually executing JS code inside V8.  This means a thread that does a 
LOT of work in JS would hog V8 so others wouldn't run (blocked in Locker).

However, a long running thread could call sleep(0) or pthread_yield() 
periodically to allow the other threads to run.


On Jul 2, 2012, at 6:04 AM, Stephan Beal wrote:

> On Mon, Jul 2, 2012 at 3:00 PM, Michael Schwartz <[email protected]> wrote:
> I just compiled the program on Ubuntu and the execution of threads is quite 
> uniform.  
> 
> For all the great work done in OSX for the user interface (the apps are 
> outstanding), it really lacks in the core OS features and the command line as 
> well.
> 
> LOL! i'm completely anti-Apple, but i'm going to say this anyway: to be fair, 
> OSX is a desktop OS and Ubuntu is (at its heart) a server OS, and both are 
> optimized for their purposes. It would be "highly unusual" for most desktop 
> apps to spawn 600 threads, i think, and i don't know anyone would installs 
> 3000 Euro laptops in their server racks.
> 
> -- 
> ----- stephan beal
> http://wanderinghorse.net/home/stephan/
> http://gplus.to/sgbeal
> 
> 
> -- 
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to