O.
2011/1/6 Hepner <gaf...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "v8cgi" group.
> To post to this group, send email to v8...@googlegroups.com.
> To unsubscribe from this group, send email to v8cgi+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/v8cgi?hl=en.
>
>
O.
2011/1/8 Amir Gafner <gaf...@gmail.com>:
sorry it took me so long to resolve this. Here are my observations:
1) windows apache version indeed ships only with the "worker" module (threaded);
2) v8cgi is not threadsafe, so one must use ThreadsPerChild=1 on Windows.
Therefore, your initial statement holds - only one request can be
served at a time.
However, I find this situation uncomfortable, so I started
implementing some stuff in v8cgi with the goal to make it threadsafe.
My latest commit (revision 898) makes v8cgi at least basically
threadsafe by using the v8::Locker object; this way, v8cgi can be used
by multithreaded apache module.
HOWEVER, there is a big technical limitation caused by V8: even in
multithreaded environment, only one thread can access V8 at a time.
This means that all used threads must wait until V8 is released by the
current thread. It is possible to explicitely release V8 in order to
call some long-running non-V8 tasks; i just implemented this for the
system.sleep() function.
To make long story short: there is a room for improvements; my latest
commit allows some level of multithreaded processing, when one thread
performs system.sleep() and other threads do their normal tasks.
Sincerely,
Ondrej Zara
2011/1/8 Ondřej Žára <ondre...@gmail.com>: