Maximum number of threads in rhino javascript engine

49 views
Skip to first unread message

Context This

unread,
May 19, 2015, 12:56:17 AM5/19/15
to mozill...@googlegroups.com

What is the maximum number of threads which Rhino uses by default. And how can I change the number of threads Rhino is using?

I am running Rhino 1.7.

Evgeny Shepelyuk

unread,
May 20, 2015, 2:09:49 AM5/20/15
to mozill...@googlegroups.com
Rhino interpreter runs in caller thread, unless you use spawn function, that creates new thread. So there is no thread number limitation.
Could you provide more details on your usage scenario ?

Context This

unread,
May 20, 2015, 6:23:57 AM5/20/15
to mozill...@googlegroups.com
I am running a REST service on tomcat server. From there I need to invoke RhinoScriptEngine.
Since, I can receive requests as many as 300 requests per second. I want to know whether there is a way to increase number of threads Rhino uses?

Thanks.
Waiting for reply..................

Evgeny Shepelyuk

unread,
May 20, 2015, 6:27:56 AM5/20/15
to mozill...@googlegroups.com
Hello

You should configure Tomcat to manage threads. 
As I've mentioned - Rhino doesn't create own threads but executes scripts in caller thread, i.e. in thread provided by Tomcat.


середа, 20 травня 2015 р. 13:23:57 UTC+3 користувач Context This написав:

Prvz Khan

unread,
May 20, 2015, 6:46:22 AM5/20/15
to mozill...@googlegroups.com
Thanks, Evgeny Shepelyuk
Reply all
Reply to author
Forward
0 new messages