Search · Index

Tcl Thread Library

Libthread is the standard Tcl thread library developed by Zoran Vasiljevic and provides optional functionality for OpenACS. Threads created by the Tcl thread library are executed in an event loop, which makes it easy to send commands to such threads. xotcl-core provides support for the the thread library and uses it for example for [background delivery] of large files. Also the chat package uses libthread when it is installed. The xotcl-request-monitor depends on libthread.

INSTALLATION:

1. Get and install libthread:

    download thread2.6.5 from


http://mesh.dl.sourceforge.net/sourceforge/tcl/thread2.6.5.tar.gz

 untar it and go to you platform specific directory (eg. thread2.6.5/unix)


# cd unix
# ../configure --enable-threads \
--prefix=/usr/local/aolserver \
--exec-prefix=/usr/local/aolserver \
--with-aolserver=/usr/local/aolserver

use --prefix --exec-prefix --with-aolserver with the path pointing to the directory, where aolserver4 is installed. The flag --with-aolserver is essential. When multiple Tcls are installed on the system, it is recommended to use the flag pointing to it, like e.g. in --with-tclinclude=/usr/local/src/tcl8.4.16/unix/ --with-tcl=/usr/lib/

  make
# check in output if there is following definition: -DNS_AOLSERVER=1
make install

You should now have installed libthread2.6.5.so (check for /usr/local/aolserver/lib/thread2.6.5/libthread2.6.5.so

2) Adjusting config.tcl for libthread service

    I would recommed to load libthread 2.6.5 as a "module" from the aolserver config file to avoid a mixup with the plain tcl libthread extension (which is most likely compiled without --with-aolserver)

  • open config.tcl (/var/lib/aolserver/${yourservice}/etc/config.tcl)
  • look for modules section: ns_section ns/server/${server}/modules
  • add libthread to modules section:


    ns_param libthread ${homedir}/lib/thread2.6.5/libthread2.6.5.so

restart the aolserver and check the error log, whether libthread2.6.5 was loaded successfully.


svc -t /service/${yourservice}

 

Previous Month July 2017
Sun Mon Tue Wed Thu Fri Sat
25 26 27 28 29 30 (2) 1
2 (1) 3 (1) 4 (1) 5 6 (8) 7 8
9 10 11 12 13 14 15
16 17 18 19 (1) 20 21 (1) 22
23 (2) 24 25 26 27 28 29
30 31 1 2 3 4 5

Popular tags

17 , 5.9.0 , 5.9.1 , ad_form , ADP , ajax , aolserver , asynchronous , bgdelivery , bootstrap , bugtracker , CentOS , COMET , CSP , CSRF , cvs , debian , emacs , fedora , FreeBSD , host-node-map , hstore , includelets , install , installation , installers , install-ns , javascript , libthread , linux
No registered users in community xowiki
in last 30 minutes
Contributors

OpenACS.org