From: Vlad S. <vl...@cr...> - 2006-09-13 20:24:00
|
No hurry, i am doing this the old-fashioned way using ns_thread for now but ns_job-like way of handling proxies would be nice Zoran Vasiljevic wrote: > On 13.09.2006, at 21:52, Vlad Seryakov wrote: > >> ok, for example i schedule encoder >> >> ns_proxy configure channel1 -minslaves 0 -maxslaves 1 >> set h [ns_proxy get channel1] >> ns_proxy send $h "/usr/bin/mencoder ...." >> >> now proxy is running and pool channel1 is taken, in another thread i >> cannot just issue ns_proxy get channel1, it will hang. >> >> I can run ns_proxy active or ns_proxy handles but how i would know >> about >> this particular process in order to use ns_kill? > > I believe that ns_proxy as-implemtented now is not entirely > correctly, hence it opens whole lotta questions > as yours above. I'm gonna have to (partly) rewrite it tomorrow. > But before I do that, the answers: > > Normally a proxy pool is just a collection of proxy-structures. > Each proxy structure is used to communicate with (and control) > an process instance. Each thread can acquire a number of such > structures from the pool. After doing so, it has sole ownership > of the proxy(es) and other threads have no access to them. > When a thread is done with the proxy, it can return it to pool > in which case some other threads can acquire it. > So, the proxy structure cannot be shared among threads. There > is no locking that would support that. > > Now we may think about adding this, but to be honest I haven't > thougth about that at all yet. My first goal is to have a properly > working ns_proxy module. After we get this stable (which it still > is not) we can think about extending it. > > Cheers, > Zoran > > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |