the subcommands "ns_thread wait" and "ns_thread join" are implemented with the identical c-code
(calling Ns_ThreadJoin(), which calls straigth pthread_join()).
aolserver has now own thread semantics.

"insistence"? You mean, why there are 2 commands? I could only guess: A few commands
are there solely for backward compatibility.

-gustaf neumann

On 22.06.12 00:21, Sep Ng wrote:
Thanks Maurizio.  I will review the links you have posted.

I wanted to raise this question to everyone. It seems to me that ns_thread wait and join have the same functionality. If that is the case, why the insistence of defining the 'wait' command?



On Thursday, June 21, 2012 10:13:47 PM UTC+8, Maurizio Martignano wrote:

    Dear Sep Ng,

                    Memory leaks do exist in the majority
    of Web Servers (Aolserver included). This is a sad
    fact. Instead of trying to fix these leaks a better
    and cheaper strategy could be to have a daily restart
    of your web/application server.

    In case you need continuous operation, you can set up
    a cluster of web/application servers where each one of
    them does a restart every now and then to cope with
    the memory leaks, in any case the cluster never stops
    being available.

    I created several installations of this type, see for
    instance:

    
http://www.spazioit.com/pages_en/sol_inf_en/distributed-sandbox-for-application-servers_en/
    
<http://www.spazioit.com/pages_en/sol_inf_en/distributed-sandbox-for-application-servers_en/>

    Another need, which now unfortunately emerged in my
    area is the requirement to have redundant
    installations, capable of resisting to catastrophic
    events. You can find something about this in here:

    http://www.spazioit.com/pages_en/sol_inf_en/disaster_recovery_solutions_en/
    
<http://www.spazioit.com/pages_en/sol_inf_en/disaster_recovery_solutions_en/>

    I hope you find this information useful.

    Ciao,

    Maurizio

    *From:*Sep Ng
    *Sent:* 21 June 2012 03:10
    *To:* [email protected]
    <mailto:[email protected]>
    *Subject:* [AOLSERVER] pthreads and AOLserver

    I've been poking around with how AOLserver handles
    ns_threads and wanted to raise the questions
    pertaining to memory leaks.
    From the pthread_create man page...

    A thread may either be/joinable/  or/detached/.  If a thread is joinable, 
then

            another thread can callpthread_join(3)  
<http://www.kernel.org/doc/man-pages/online/pages/man3/pthread_join.3.html>  to 
wait for the thread to terminate

            and fetch its exit status.*Only when a terminated joinable thread 
has been*

    *        joined are the last of its resources released back to the system.*


    Does this mean that if I don't use ns_thread join, the
    resources and tcl interpreter of the thread spawned by
    ns_thread begin will not get released?

    If someone would kindly definitively answer this for
    me, that would be well appreciated.

    Regards.




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
aolserver-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aolserver-talk

Reply via email to